I am having the same RH9 Nvidia problem. I tried recompiling glut-3.7 from source, and re-installing the rpm to no avail. The solution I found was (with the help of that rather nice library searching script) to link the two libraries Xi and Xmu where I found the missing symbols:
/usr/lib/libglut.so: undefined reference to XGetExtensionVersion' /usr/lib/libglut.so: undefined reference toXFreeDeviceList’
/usr/lib/libglut.so: undefined reference to XQueryDeviceState' /usr/lib/libglut.so: undefined reference toXListInputDevices’
/usr/lib/libglut.so: undefined reference to XFreeDeviceState' /usr/lib/libglut.so: undefined reference toXOpenDevice’
/usr/lib/libglut.so: undefined reference to XmuLookupStandardColormap' /usr/lib/libglut.so: undefined reference toXSelectExtensionEvent’
Got rid of the undefined reference to “X…” functions. They seem to be functions specific to XWindows system (probably used from glx.h), and gcc’s linker didn’t know where to find them.
Thanks for fixing this problem.
p.s. When I tried to compile some other sample opengl programs there were a new set of ‘X…’ functions undefined. Oh well, maybe I’ll find them in some other X libs.
[This message has been edited by robysath (edited 12-30-2003).]
Here’s the libraries i used to get rid of my linking problems:
gcc -L/usr/X11R6/lib -L/usr/lib -lGL -lX11 -lGLU -lglut -lpthread -lXxf86vm -lXi -lXmu gl.c -o gl
and here’s the linking errors I got:
/usr/lib/gcc-lib/i386-redhat-linux/3.2.2/…/…/…/libglut.so: undefined reference to XGetExtensionVersion' /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/../../../libglut.so: undefined reference toXFreeDeviceList’
/usr/lib/gcc-lib/i386-redhat-linux/3.2.2/…/…/…/libglut.so: undefined reference to XQueryDeviceState' /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/../../../libglut.so: undefined reference toXListInputDevices’
/usr/lib/gcc-lib/i386-redhat-linux/3.2.2/…/…/…/libglut.so: undefined reference to XFreeDeviceState' /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/../../../libglut.so: undefined reference toXOpenDevice’
/usr/lib/gcc-lib/i386-redhat-linux/3.2.2/…/…/…/libglut.so: undefined reference to XmuLookupStandardColormap' /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/../../../libglut.so: undefined reference toXSelectExtensionEvent’
collect2: ld returned 1 exit status
I have been trying to compile a simple OpenGL program and getting the same error as above. I tried compiling glut on RHL9 but got another error (related to pthread). While searching on thge web, in addition to this site I came across another thread on the opengl.org forum: http://www.opengl.org/discussion_boards/ubb/Forum4/HTML/001014.html
As suggested by one of the users, I uninstalled glut and glut-devel and installed version 3.7-4 (from the RHL8 distro). Everyone compiles and runs perfectly fine now! If you are having the above mentioned problems on RHL9, you might want to give it a shot…
oops… sorry I meant 3.7-8… sorry again for the mistake. Here is a pasting of what I followed (more or less… the post mentions grabbing the rpms from Red Hat’s site. I used the ones I had on CD…):
By: jahshaka ( jah shaka )
RE: compiling on redhat 9 ftgl/glut fixes
2003-06-05 01:06
Ok theres a great and easy workaround for this! Basically you need to swap the glut libraries that come with redhat 9 for the ones that come with redhat 8
hey there, it seems not to be an OpenGL problem. More I would say a gcc <-> RedHat “feature” (You know: it’s not a bug, it’s a feature. ;-}
Shortly I faced a similar behaviour using gcc under a RedHat system.
My solution was just a change of the options in the gcc (g++) command line like this:
>>gcc -I"inc-path" -L"lib-path" -o “out_file” “my_sourcen” -l"used_lib"
changing the order to
>>gcc -I"inc-path" -L"lib-path" -l"used_lib" -o “out_file” “my_sourcen” will result in undefined references