[CMake] Qt and Windows

Alexander Neundorf a.neundorf-work at gmx.net
Wed Jul 19 02:54:31 EDT 2006


Hi Flavio,

Von: "Flávio P. Duarte" <fduarte at gisplan.com.br>

> 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

I guess you just left out the

TARGET_LINK_LIBRARIES(test ${QT_LIBRARIES} )

?

Bye
Alex


-- 


"Feel free" – 10 GB Mailbox, 100 FreeSMS/Monat ...
Jetzt GMX TopMail testen: http://www.gmx.net/de/go/topmail


More information about the CMake mailing list