[CMake] cmake link against Qt4's OpenGL

Michael Jackson mike.jackson at bluequartz.net
Fri Sep 26 16:43:57 EDT 2008


run ccmake instead of cmake on your project. Look down the left hand  
side of cmake variables. It should be listed.

By default it should be 10.5.sdk so I am not sure what is really going  
wrong.

also, do the following:

make clean
make VERBOSE=1

in your build directory and lets examine the compile and link lines..


Mike


On Sep 26, 2008, at 4:40 PM, Linge Bai wrote:

> my mac os x is 10.5.4, it's PPC. Xcode is version 3.1. I'm sorry  
> that I have no idea how to check CMAKE_OSX_SYSROOT.
>
> Linge
>
> On Fri, Sep 26, 2008 at 4:33 PM, Michael Jackson <mike.jackson at bluequartz.net 
> > wrote:
> 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
>
> _______________________________________________
> CMake mailing list
> CMake at cmake.org
> http://www.cmake.org/mailman/listinfo/cmake
>



More information about the CMake mailing list