[CMake] cmake link against Qt4's OpenGL
Michael Jackson
mike.jackson at bluequartz.net
Fri Sep 26 16:33:51 EDT 2008
What is your OS X version, (PPC or Intel), Xcode toolset version, and
what are you setting the CMAKE_OSX_SYSROOT value to? It should be /
Developer/SDKs/MacOSX10.5.sdk
Mike
On Sep 26, 2008, at 4:26 PM, Linge Bai wrote:
> so if I use cmake 2.6.1, with the following CMakeList.txt file:
>
> PROJECT ( COMBINED )
> FIND_PACKAGE (Qt4 REQUIRED)
> SET(QT_USE_QTOPENGL TRUE)
> INCLUDE( ${QT_USE_FILE} )
> ADD_EXECUTABLE(exe main.cpp glwidget.cpp window.cpp)
> TARGET_LINK_LIBRARIES(exe ${QT_LIBRARIES})
>
> I am able to link to Qt4's OpenGL, but I have a link error:
>
> make
> Scanning dependencies of target exe
> Linking CXX executable exe
> ld: library not found for -lcrt1.10.5.o
> collect2: ld returned 1 exit status
> make[2]: *** [exe] Error 1
> make[1]: *** [CMakeFiles/exe.dir/all] Error 2
> make: *** [all] Error 2
>
> I have no idea what this error means.
>
> Linge
More information about the CMake
mailing list