c++visual-studio-2010qstringlnk2001

error LNK2001: unresolved external symbol "__declspec(dllimport) public: class QString & __thiscall QString::operator=(class QString &&)"


I'm desperate about finding any information about the mentioned error.

I'm working on visual studio 2010. When I compile my project (in 32 bits), in debug or release, I get the following message :

1>heterogeneous.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: class QString & _thiscall QString::operator=(class QString &&)" (_imp_??4QString@@QAEAAV0@$$QAV0@@Z)

1>debug\nori.exe : fatal error LNK1120: 1 unresolved externals

I linked QtCore4.lib in Linker->Input, I added Qt\4.8.2\lib to the library directories in Linker->General, and I included Qt\4.8.2\include and Qt\4.8.2\include\QtCore in C/C++->General. It seems to me that they are supposed to define QString. I don't know what else I could do.

Thank you very much for your help.


Solution

  • I had same issue, but I was using the Qt Libraries for VS2008.

    I installed Qt Libraries for VS2010 to solve the problem.