[CMake] Qt and Windows

"Flávio P. Duarte" fduarte at gisplan.com.br
Tue Jul 18 17:06:13 EDT 2006


Hi,
  I am converting a cross-plataform application from autotools to cmake.
It is now close to perfection in Linux, but in Windows it is refusing to
link (?) with Qt. All Qt symbols are shown the following message:
error LNK2001: unresolved external symbol "public: virtual bool
__thiscall QDomNode::isComment"...

  My configuration is:
CMake: 2.4.2
Qt:    3.2.1
MS Visual Studio Net 2003

Relevant CMake section:
INCLUDE( ${CMAKE_ROOT}/Modules/FindQt.cmake )

...

IF( NOT QT_FOUND )
  MESSAGE( FATAL_ERROR "Qt not found" )
ENDIF( NOT QT_FOUND )

ADD_DEFINITIONS( ${QT_DEFINITIONS} )
INCLUDE_DIRECTORIES( ${QT_INCLUDE_DIR} )

IF (WIN32)
  SET(QT_DEFINITIONS -DQT_DLL)
ENDIF(WIN32)

...

ADD_LIBRARY( test SHARED ${SRCS} )


  Since the files are being compiled, I assume CMake is finding Qt. In
the project properties I could confirm that, but I found no reference to
Qt libraries.

Has anyone faced this problem ?

Thanks,
	Flavio


More information about the CMake mailing list