Hi,
I'm using CMake and VS2008. When I use cmake, it links against QtCore4.lib, QtNetwork4.lib etc for Debug versions of my project, and QtCore.lib, QtNetwork.lib for my Release version.
However, I can't link my projects using the QtCore.lib, QtNetwork.lib versions so the release version of my project wont link.
The following two lines -
return a.exec();
QApplication a( argc, argv );
return a.exec();
To copy to clipboard, switch view to plain text mode
give the following link errors -
1>Linking...
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall QApplication::~QApplication(void)" (__imp_??1QApplication@@UAE@XZ) referenced in function _main
1>main.
obj : error LNK2019
: unresolved external symbol
"__declspec(dllimport) public: static int __cdecl QApplication::exec(void)" (__imp_?exec@
QApplication@@SAHXZ
) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall QApplication::QApplication(int &,char * *,int)" (__imp_??0QApplication@@QAE@AAHPAPADH@Z) referenced in function _main
1>Linking...
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall QApplication::~QApplication(void)" (__imp_??1QApplication@@UAE@XZ) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: static int __cdecl QApplication::exec(void)" (__imp_?exec@QApplication@@SAHXZ) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall QApplication::QApplication(int &,char * *,int)" (__imp_??0QApplication@@QAE@AAHPAPADH@Z) referenced in function _main
To copy to clipboard, switch view to plain text mode
However if I rename QtCore.lib to QtCore4.lib for my relase project then I don't get the link errors.
I have built Qt using the following 2 commands -
C:\Qt\2009.02\qt>configure -no-qt3support -platform win32-msvc2008 -no-libtiff -no-phonon -no-phonon-backend -no-webkit -qt-sql-mysql -l libMySql -I C:\mysql\include -L C:\mysql\lib\opt -static -release
C:\Qt\2009.02\qt>nmake
What is wrong with the QtCore.lib, QtNetwork.lib versions?
Thanks,
Barry
Bookmarks