6
votes

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.

3
Was the Qt that you are using compiled for Visual Studio 2010 x86?drescherjm
Also you should link against QtCore4d.lib in debug builds.drescherjm
Yes I linked against QTCore4.lib in Release mod and QtCored4.lib in Debug mod. I didn't install the Qt plugin for VS2010 and I installed the qt libraries for win x64.Yauda

3 Answers

3
votes

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

I installed Qt Libraries for VS2010 to solve the problem.

0
votes

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

0
votes

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 !