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

StackOverflow https://stackoverflow.com/questions/12428282

Question

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.

Was it helpful?

Solution

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

I installed Qt Libraries for VS2010 to solve the problem.

OTHER TIPS

Find out where the Qt DLLs are. You may have to add that directory to Debugging->Environment.

After some time, I decided to delete and re-install the Qt libraries, and it works. However, I have no idea why.

Thanks for your help !

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top