[CMake] Cmake 2.8.10 with Qt 5.0.1 under Win8 with VS2012: undefined external symbol

Meteorhead nagymatef at freemail.hu
Wed Feb 13 10:24:15 EST 2013


Hi!

I have started fiddling with CMake aiming to serve as the makefile for a new
project aiming linux and Windows platforms, involving many other libs, test
modules, etc. Therefore it seems like the optimal choice. I wanted to create
a comprehensive “tutorial” for some friends (and collegues) coming mainly
from the Windows side of application development. Heavily commented
makefiles with multiple interdependant projects, each showing one feature of
CMake and getting more complex down the road.

However with Qt involved I cannot even compile two simple projects, one
targeting a shared library containing a simple QObject inherited class, and
the other targeting an executable linking againts this library. Problem is
that not even the library fails at linking with unresolved externals. I have
built projects with both qmake before and the VS-plugin, but something is
missing here. It seems as if the generated MOC files would not contain the
required symbols or if cmake would not add them to the sources when building
the target.

(I have removed some comments to make post shorter)

Source code <http://pastebin.com/uFyRzdHE>  

CMakefiles <http://pastebin.com/ZkDg6QfW>  

nmake output <http://pastebin.com/EeSq5hcg>  

Naturally problems arise when USE_QT5 is set. All help is greatly
appreciated.




--
View this message in context: http://cmake.3232098.n2.nabble.com/Cmake-2-8-10-with-Qt-5-0-1-under-Win8-with-VS2012-undefined-external-symbol-tp7583205.html
Sent from the CMake mailing list archive at Nabble.com.


More information about the CMake mailing list