Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I'm trying to find some opengl dev files and I had it working great in 11.10. I can just barely move around cmake and kind of wrap my head around linux development.

If anyone can provide a better explanation of how I can solve this problem after upgrades and what I should look for in the future would be a huge help.

Here is one of my cmake modules.

INCLUDE (FindPackageHandleStandardArgs)
FIND_PACKAGE(PkgConfig ${gl_FIND_REQUIRED} ${gl_FIND_QUIETLY})
IF (PKG_CONFIG_FOUND)
    SET(PKG_CONFIG_PATH_ENV_VAR $ENV{PKG_CONFIG_PATH})
    IF (NOT PKG_CONFIG_PATH_ENV_VAR)
        IF (gl_FIND_REQUIRED)
            MESSAGE (FATAL_ERROR "Environment variable PKG_CONFIG_PATH not set. Setting this variable is required in order for pkg-config to locate installed software packages.")
        ENDIF (gl_FIND_REQUIRED)
    ENDIF (NOT PKG_CONFIG_PATH_ENV_VAR)
    PKG_CHECK_MODULES (gl gl)
    IF (gl_FOUND)
        SET(gl_LIBRARY ${gl_LIBRARIES})
        SET(gl_INCLUDE_DIR ${gl_INCLUDEDIR})
        SET(gl_LIBRARY_DIR ${gl_LIBRARY_DIRS})
        IF (NOT gl_FIND_QUIETLY)
            MESSAGE(STATUS "    includedir: ${gl_INCLUDE_DIR}")
            MESSAGE(STATUS "    librarydir: ${gl_LIBRARY_DIR}")
        ENDIF (NOT gl_FIND_QUIETLY)
    ENDIF(gl_FOUND)
ENDIF (PKG_CONFIG_FOUND)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(gl DEFAULT_MSG gl_LIBRARY gl_INCLUDE_DIR)

I have basically the same file for glu and glui.

I am not sure what got screwed up in my dev enviornment, but your help is much appreciated.

The error

 DrawGLScene(): error: undefined reference to 'glutSwapBuffers'
share|improve this question

1 Answer 1

up vote 0 down vote accepted

There is nothing wrong with this module. I found a more immediate error that was causing the actual linking of this module to fail.

So it should work great for anyone looking to either have a decent module template or find opengl. Thanks.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.