<br><br><div><span class="gmail_quote">On 1/28/07, <b class="gmail_sendername">Eric Noulard</b> <<a href="mailto:eric.noulard@gmail.com">eric.noulard@gmail.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
2007/1/27, David Morris <<a href="mailto:dvmorris@gmail.com">dvmorris@gmail.com</a>>:<br>> I'm new to cmake, and I have been trying to find a good comprehensive<br>> tutorial to get myself started, but have had no luck. Does anyone know a
<br>> good one besides the <a href="http://cmake.org">cmake.org</a> site and the linuxjournal one?<br><br>No but the Wiki <a href="http://www.cmake.org/Wiki/CMake">http://www.cmake.org/Wiki/CMake</a><br>is a good start.
<br><br>Moreover I advise you to read (even fast read) the<br>documentation "man cmake" or "<a href="http://www.cmake.org/HTML/Documentation.html">http://www.cmake.org/HTML/Documentation.html</a>".<br>
<br>>From my experience with different collegue/friend<br>"standalone" startup time with CMake is from 1 to 3 days<br>where you find yourself "lost".<br><br>After that period you keep getting things work as you want
<br>faster and faster.<br><br>><br>> I will try to describe one problem i'm having, but I'm not really sure where<br>> to begin. I'm trying to compile a C++ project and I get this error:<br>><br>> /usr/bin/ld: Undefined symbols:
<br>> _glBegin<br>> _glBindTexture<br>> _glColor3d<br>> _glColor3f<br>> _glCullFace<br>> ...<br>> ...<br><br>Seems you need to link with OpenGL.<br>Try add the following to<br><br>FIND_PACKAGE(OpenGL)
<br>IF (OPENGL_FOUND)<br> MESSAGE(STATUS "Looking for OpenGL - found : ${OPENGL_gl_LIBRARY}")<br> GET_FILENAME_COMPONENT(GLPATH ${OPENGL_gl_LIBRARY} PATH)<br> LINK_DIRECTORIES(${GLPATH})<br>ELSE (OPENGL_FOUND)
<br> MESSAGE(STATUS "Looking for OpenGL - not found")<br>ENDIF (OPENGL_FOUND)<br><br><br>><br>> SET(Libraries fltk_images fltk_gl fltk arcball vecmat)<br>><br>> SET(CurrentExe "TopMod")<br>
> FILE(GLOB SRC *.cc)<br>> ADD_EXECUTABLE(${CurrentExe} ${SRC})<br>> TARGET_LINK_LIBRARIES(${CurrentExe} ${Libraries})<br><br>ADD GL library<br><br>TARGET_LINK_LIBRARIES(${CurrentExe} ${OPENGL_gl_LIBRARY})<br><br>
--<br>Erk<br>_______________________________________________<br>CMake mailing list<br><a href="mailto:CMake@cmake.org">CMake@cmake.org</a><br><a href="http://www.cmake.org/mailman/listinfo/cmake">http://www.cmake.org/mailman/listinfo/cmake
</a></blockquote><div><br><br>That code seemed to work for OpenGL, thanks.<br><br>I am still getting some unresolved symbols, but none that have anything to do with OpenGL:<br><br>/usr/bin/ld: Undefined symbols:<br>_ClipRect
<br>_GetPort<br>_GetWindowPort<br>_SetPort<br>_SetRect<br>_GetWindowPortBounds<br>_AECountItems<br>_AECreateDesc<br>_AEDisposeDesc<br>_AEGetNthPtr<br>_AEGetParamDesc<br><br>searching for these terms on google always show me something that is Apple specific, and I found one old mailing list post about how CMake thinks I'm not compiling on a OS X anymore, and that I need to trick it into changing the compiler. I checked out my
CMakeCache.txt file in my project directory, and I found these lines:<br><br>//C compiler.<br>CMAKE_C_COMPILER:FILEPATH=/usr/bin/gcc<br><br>//CXX compiler.<br>CMAKE_CXX_COMPILER:FILEPATH=/usr/bin/c++<br><br>I'm not sure if the CXX compiler is correct, or if it should be g++. I tried changing it there but it didn't go anything. Any ideas?
<br>thanks for the help,<br>dave<br></div><br></div><br>