PDA

View Full Version : compile errors under redhat 9.a



mirella
10-13-2003, 10:29 PM
I'm new to opengl and programming.
I've tried to compile (under Linux redhat 9.a) a simple opengl program that creates a window.
the compilation command was:
gcc window.c -L/usr/lib -L/usr/X11R6 -lglut -lGL -lGLU -lXmu
The result was:
/usr/lib/gcc-lib/i386-redhat-linux/3.2.2/../../../libglut.so: undefined reference to 'XGetExtensionVersion'
'XFreeDeviceList'
'XQueryDeviceState'
'XListInputDevice'
'XOpenDevice'
...
collect2:ld returned1 exit status

Is it a version problem or is the command line wrong?
My directory /usr/local/lib is empty.
Which libraries do I need to compile correctly?
Thank you for every suggestion.
mirella

Rob Fletcher
10-14-2003, 02:29 AM
Hi

Try adding -lXi to your command line to
pick up the X input extensions library.

Rob

mirella
10-15-2003, 09:47 PM
Hi Rob,
Thank you for yuor suggestion!
Adding -lXi to my command line the program compiles and runs correctly.

mirella