Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 9 of 9

Thread: OpenGL libraries

  1. #1
    Junior Member Newbie
    Join Date
    Mar 2007
    Location
    Michigan
    Posts
    5

    OpenGL libraries

    I'm trying to get a computer vision system that uses OpenGL working and I'm stuck at the requirement for OpenGL libraries. I can't figure out what libraries I need for the compile and the documentation doesn't list the libraries. I'm running Ubuntu and the vision system's name is Hornetseye.

    When I run the configure I get the following error:

    checking for OpenGL... yes
    checking for GL... no
    checking for GLU... no
    checking for glut... no
    configure: error: Check for OpenGL (GL,GLU,glut) failed.

    When I took a look at config.log I found the following:

    || test ! -s conftest.err
    configure:21973: $? = 0
    configure:21976: test -s conftest
    configure:21979: $? = 0
    configure:21992: result: yes
    configure:22013: checking for OpenGL
    configure:22070: checking for library containing glAccum
    configure:22100: gcc -o conftest -g -O2 conftest.c -lSM -lICE -lX11 -lXext -lXmu -lXt -lXi >&5
    /usr/bin/ld: cannot find -lXmu
    collect2: ld returned 1 exit status
    configure:22106: $? = 1
    configure: failed program was:
    | /* confdefs.h. */

    In configure.ac I found the following which I think is what looks for the libraries:

    dnl Check for opengl
    MDL_HAVE_OPENGL
    HAVE_OPENGL="yes"
    AC_MSG_CHECKING([for GL])
    if test "x$have_GL" != "xyes"; then
    AC_MSG_RESULT([no])
    HAVE_OPENGL="no"
    else
    AC_MSG_RESULT([yes])
    fi
    AC_MSG_CHECKING([for GLU])
    if test "x$have_GLU" != "xyes"; then
    AC_MSG_RESULT([no])
    HAVE_OPENGL="no"
    else
    AC_MSG_RESULT([yes])
    fi
    AC_MSG_CHECKING([for glut])
    if test "x$have_glut" != "xyes"; then
    AC_MSG_RESULT([no])
    HAVE_OPENGL="no"
    else
    AC_MSG_RESULT([yes])
    fi
    if test "x$HAVE_OPENGL" != "xyes"; then
    AC_MSG_ERROR([Check for OpenGL (GL,GLU,glut) failed.])
    fi

    But, like I wrote above, I'm not sure what to load because I can't puzzle out what the ./confgure wants.

    Allen

  2. #2
    Advanced Member Frequent Contributor
    Join Date
    Aug 2004
    Location
    munich, germany
    Posts
    657

    Re: OpenGL libraries

    that's a lot of output- at first sight an error occurs because the linker cannot find libXmu.so when trying to compile conftest.c.

    check if libXmu.so is installed on your system; it is probably in /usr/X11R6/lib/libXmu.so

    if the error still occurs because libXmu cannot be found, you may have to change an include path variable in the makefile, or easier: make an alias to gcc like

    alias gcc 'gcc -I/usr/X11R6/lib'

    (assuming that the libXmu.so is really in that directory)

  3. #3
    Senior Member OpenGL Pro
    Join Date
    Jul 2001
    Location
    France
    Posts
    1,749

    Re: OpenGL libraries

    It also seems your GL libraries are missing.

    Try an 'apt-get install freeglut' and an 'apt-get install freeglut-devel'.
    If it can't find it, then use aptitude and look for them (the GL libraries should be called Mesa).

  4. #4
    Junior Member Newbie
    Join Date
    Mar 2007
    Location
    Michigan
    Posts
    5

    Re: OpenGL libraries

    RigidBody - libXmu.so is in /usr/lib but the alias command didn't do anything noticeable. Thanks for trying.

    jide - I love aptitude. Quicker then synaptic and easier to use then apt-get but if there's a GL library missing I can't see it. Aptitude reports that GL, Glu, Glut are all there. Thanks to you as well.

  5. #5
    Advanced Member Frequent Contributor
    Join Date
    Aug 2004
    Location
    munich, germany
    Posts
    657

    Re: OpenGL libraries

    shame on me- it should be

    alias gcc 'gcc -L/usr/lib'

    -L defines the library path, -I the include path. my apologies...

  6. #6
    Senior Member OpenGL Pro
    Join Date
    Jul 2001
    Location
    France
    Posts
    1,749

    Re: OpenGL libraries

    I generally use both directories:

    gcc xxxx -L /usr/lib -L /usr/X11R6/lib yyy

    in that way you generally are not missing anything.

  7. #7
    Junior Member Newbie
    Join Date
    Mar 2007
    Location
    Michigan
    Posts
    5

    Re: OpenGL libraries

    Thanks guys but no change.

    I think there may be a bug in one of the .m4 files. There's a macro - mdl_have_opengl.m4 - that's supposed to look up the OpenGL libraries which might be causing the problem. Maybe.

  8. #8
    Senior Member OpenGL Pro
    Join Date
    Jul 2001
    Location
    France
    Posts
    1,749

    Re: OpenGL libraries

    So avoid it ! I don't like to use many of such macros. They change often, new releases of automake can't ensure they will still work...

    Did you tried out a simple line just like this one ?

    gcc my_program.c -o my_program -L /usr/X11R6/lib -lglut -lGLU -lGL -lXmu

    ??

  9. #9
    Junior Member Newbie
    Join Date
    Mar 2007
    Location
    Michigan
    Posts
    5

    Re: OpenGL libraries

    Thanks for your help guys.

    I've got the system working now. All it took was for the developer to look at his code and notice a call that he'd planned to take out but didn't.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •