[cmake]glu32.lib opengl32.lib

William A. Hoffman billlist at nycap.rr.com
Mon Dec 26 13:28:07 EST 2005


At 09:41 AM 12/25/2005, Chunyan Jiang wrote:
>Dear cmake users,
>I write my CMakeLists.txt to build my project with VC++6 under windowXP
>
>There are some link errors,
>fltkgld.lib(gl_start.obj) : error LNK2001: unresolved external symbol
>__imp__glDisable at 4
>fltkgld.lib(gl_start.obj) : error LNK2001: unresolved external symbol
>__imp__glEnable at 4
>
>I searched on internet, these errors might caused by opengl library
>link problem.
>
>I find that in my project work space in visual studio 6,
>Manu/Project/Settings.../MyProject Link page/Object Library modules,
>there is no glu32.lib, opengl32.lib, and so on.
>
>Then I add
># System libraries
>SET(MyProject_SYSTEM_LIBS
>  ${OPENGL_LIBRARIES}
>  ${OPENGL_glu_LIBRARY}
>  ${SYSTEM_LIBS}
>)
>
>To my CMakeLists.txt, and build again.
>But the problem is still unsolved.
You need to make sure those variables are set.  You need to add a 
FIND_PACKAGE(FindOpenGL) to your cmakelist file.

-Bill



More information about the CMake mailing list