Compile errors under redhat 9.a

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

Hi

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

Rob

Hi Rob,
Thank you for yuor suggestion!
Adding -lXi to my command line the program compiles and runs correctly.

mirella

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.