-
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???
-
Re: Trouble with glut ??
i think your missing some crucial libraries to link to?
-
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
-
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!!
-
Junior Member
Regular Contributor
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
-
Forum Rules