i get a similar error. Even i’m using Red Hat GNU/Linux 9.0 and have installed glut from the rpm’s 3.7.12 (glut and glut-devel). My compilation output is :
[root@kkp opengl]# gcc g.cc -o g -lGL -lm -lGLU -lglut
/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 to XFreeDeviceList’
/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 to XListInputDevices’
/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 to XOpenDevice’
/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 to XSelectExtensionEvent’
collect2: ld returned 1 exit status
i did not quite understand jide’s reply. jide if you could please explain again i would be most grateful
Hi,
i tried out the -lX option but it gives me the following error :
[root@kkp opengl]# gcc g.cc -lglut -lGL -lX
/usr/bin/ld: cannot find -lX
collect2: ld returned 1 exit status
i have XFree86 dev’s, libs’s and the prog itself. Also X window dev tools and libs. Is there any pacakage(s) in particular i need under Red Hat 9 ? If not i guess somethings’s corrupted and i’ll clean up my system and do a fresh install.