Qt在VC6.0下编译出现链接错误

当Qt代码在VC6.0中编译时,如果link中没有指定链接 qtmaind.lib QtCored4.lib QtGuid4.lib 

会出现如下的错误:

Linking...

Main.obj : error LNK2001: unresolved external symbol "protected: virtual int __thiscall QWidget::metric(enum QPaintDevice::PaintDeviceMetric)const " (?metric@QWidget@@MBEHW4PaintDeviceMetric@QPaintDevice@@@Z)

Main.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall QWidget::releaseDC(struct HDC__ *)const " (?releaseDC@QWidget@@UBEXPAUHDC__@@@Z)

Main.obj : error LNK2001: unresolved external symbol "public: virtual struct HDC__ * __thiscall QWidget::getDC(void)const " (?getDC@QWidget@@UBEPAUHDC__@@XZ)

Main.obj : error LNK2001: unresolved external symbol "public: virtual class QPaintEngine * __thiscall QWidget::paintEngine(void)const " (?paintEngine@QWidget@@UBEPAVQPaintEngine@@XZ)

Main.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall QWidget::devType(void)const " (?devType@QWidget@@UBEHXZ)

.......

 

 

 

 

你可能感兴趣的:(Qt在VC6.0下编译出现链接错误)