dll在Visual Studio 2012中使用Qt

时间:2014-07-21 19:26:44

标签: c++ visual-studio qt dll libraries

我是Visual Studio的新手,现在我正面临着这个我无法解决的小问题。我正确安装了Qt并在" VC ++目录"上使用了正确的路径。我的项目的属性(确实在我的代码中正确看到了包含)。下一步应该是将正确的东西放在"链接器中。我的项目..这至少是我认为问题所在。无论如何,我有100这样的错误:

error LNK2001: unresolved external symbol "__declspec(dllimport) protected: virtual     void __thiscall QObject::disconnectNotify(class QMetaMethod const &)" (__imp_?disconnectNotify@QObject@@MAEXABVQMetaMethod@@@Z) C:\Users\Henry\Desktop\PhotonMapping\PhotonMapping\main.obj PhotonMapping
error LNK2001: unresolved external symbol "__declspec(dllimport) protected: virtual void __thiscall QObject::connectNotify(class QMetaMethod const &)" (__imp_?connectNotify@QObject@@MAEXABVQMetaMethod@@@Z)   C:\Users\Henry\Desktop\PhotonMapping\PhotonMapping\main.obj PhotonMapping
error LNK2001: unresolved external symbol "__declspec(dllimport) protected: virtual void __thiscall QObject::customEvent(class QEvent *)" (__imp_?customEvent@QObject@@MAEXPAVQEvent@@@Z)   C:\Users\Henry\Desktop\PhotonMapping\PhotonMapping\main.obj PhotonMapping
error LNK2001: unresolved external symbol "__declspec(dllimport) protected: virtual void __thiscall QObject::childEvent(class QChildEvent *)" (__imp_?childEvent@QObject@@MAEXPAVQChildEvent@@@Z)   C:\Users\Henry\Desktop\PhotonMapping\PhotonMapping\main.obj PhotonMapping
error LNK2001: unresolved external symbol "__declspec(dllimport) protected: virtual void __thiscall QObject::timerEvent(class QTimerEvent *)" (__imp_?timerEvent@QObject@@MAEXPAVQTimerEvent@@@Z)   C:\Users\Henry\Desktop\PhotonMapping\PhotonMapping\main.obj PhotonMapping
error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual bool __thiscall QObject::eventFilter(class QObject *,class QEvent *)" (__imp_?eventFilter@QObject@@UAE_NPAV1@PAVQEvent@@@Z)    C:\Users\Henry\Desktop\PhotonMapping\PhotonMapping\main.obj PhotonMapping
error LNK2001: unresolved external symbol "__declspec(dllimport) double * __cdecl annAllocPt(int,double)" (__imp_?annAllocPt@@YAPANHN@Z)    C:\Users\Henry\Desktop\PhotonMapping\PhotonMapping\main.obj PhotonMapping
error LNK2001: unresolved external symbol "__declspec(dllimport) protected: virtual int __thiscall QImage::metric(enum QPaintDevice::PaintDeviceMetric)const " (__imp_?metric@QImage@@MBEHW4PaintDeviceMetric@QPaintDevice@@@Z) C:\Users\Henry\Desktop\PhotonMapping\PhotonMapping\main.obj PhotonMapping
error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual class QPaintEngine * __thiscall QImage::paintEngine(void)const " (__imp_?paintEngine@QImage@@UBEPAVQPaintEngine@@XZ)   C:\Users\Henry\Desktop\PhotonMapping\PhotonMapping\main.obj PhotonMapping
error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall QImage::setPixel(int,int,unsigned int)" (__imp_?setPixel@QImage@@QAEXHHI@Z)    C:\Users\Henry\Desktop\PhotonMapping\PhotonMapping\main.obj PhotonMapping
error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual int __thiscall QImage::devType(void)const " (__imp_?devType@QImage@@UBEHXZ)    C:\Users\Henry\Desktop\PhotonMapping\PhotonMapping\main.obj PhotonMapping
error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall QImage::~QImage(void)" (__imp_??1QImage@@UAE@XZ)    C:\Users\Henry\Desktop\PhotonMapping\PhotonMapping\main.obj PhotonMapping
error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall QImage::QImage(int,int,enum QImage::Format)" (__imp_??0QImage@@QAE@HHW4Format@0@@Z) C:\Users\Henry\Desktop\PhotonMapping\PhotonMapping\main.obj PhotonMapping
error LNK2001: unresolved external symbol "__declspec(dllimport) double * * __cdecl annAllocPts(int,int)" (__imp_?annAllocPts@@YAPAPANHH@Z) C:\Users\Henry\Desktop\PhotonMapping\PhotonMapping\main.obj PhotonMapping
error LNK2001: unresolved external symbol "__declspec(dllimport) public: static int __cdecl QApplication::exec(void)" (__imp_?exec@QApplication@@SAHXZ) C:\Users\Henry\Desktop\PhotonMapping\PhotonMapping\main.obj PhotonMapping
error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall QApplication::~QApplication(void)" (__imp_??1QApplication@@UAE@XZ)  C:\Users\Henry\Desktop\PhotonMapping\PhotonMapping\main.obj PhotonMapping
error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall QApplication::QApplication(int &,char * *,int)" (__imp_??0QApplication@@QAE@AAHPAPADH@Z)    C:\Users\Henry\Desktop\PhotonMapping\PhotonMapping\main.obj PhotonMapping

我知道这个问题很愚蠢,但我想理解它...以这种方式学习下次我要面对它时如何解决它。提前谢谢!

恩里科

0 个答案:

没有答案