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 5 of 5

Thread: Trouble with glut ??

  1. #1
    Junior Member Newbie
    Join Date
    Jun 2001
    Location
    Denmark
    Posts
    1

    Trouble with glut ??

    I have a problem installing glut 3.7 on my mandrake 7.2 box with a tnt2m64. It apparently installs ok, but when i try to compile my program (torus.c from the Opengl Redbook) i get the following:

    # gcc -o torus torus.c -lGL -lGLU -lglut

    /usr/lib/libglut.so: undefined reference to `XGetExtensionVersion'
    /usr/lib/libglut.so: undefined reference to `XFreeDeviceList'
    /usr/lib/libglut.so: undefined reference to `XQueryDeviceState'
    /usr/lib/libglut.so: undefined reference to `XListInputDevices'
    /usr/lib/libglut.so: undefined reference to `XFreeDeviceState'
    /usr/lib/libglut.so: undefined reference to `XOpenDevice'
    /usr/lib/libglut.so: undefined reference to `XmuLookupStandardColormap'
    /usr/lib/libglut.so: undefined reference to `XSelectExtensionEvent'
    collect2: ld returned 1 exit status

    What is wrong here???

  2. #2
    Intern Contributor
    Join Date
    Dec 2000
    Location
    houston, tx
    Posts
    80

    Re: Trouble with glut ??

    i think your missing some crucial libraries to link to?

  3. #3
    Guest

    Re: Trouble with glut ??

    Perhaps do you want to use the glut from mesa since it allows you to build with your command. The original glut seems to require that you give a lot of other libraries. See http://www.opengl.org/discussion_boa...ML/000152.html

  4. #4
    Junior Member Newbie
    Join Date
    Feb 2004
    Location
    PORTUGAL
    Posts
    1

    Re: Trouble with glut ??

    I usually program under visual c++ but I've programed once in CIGWIN and it gave problems. The resolution was to write:

    gcc -o torus torus.c -lglut -lglu -lgl

    instead of:

    gcc -o torus torus.c -lGL -lGLU -lglut

    Try it!!
    SKA!!!

  5. #5
    Junior Member Regular Contributor
    Join Date
    May 2002
    Location
    York, UK
    Posts
    128

    Re: Trouble with glut ??

    You'll need other libs as well as the glut and gl libs ...

    add in to your link command line

    -lX11 -lXi -lXmu -lm

    rob

Posting Permissions

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