Chris Hernandez wrote: > > Can someone help me setup Mesa 3.0? When linking some code I get this error: > > [c13] /home/c13/cs414/work<6>% make > gcc -I/usr/include -I/usr/local/include/GL -I/usr/X11R6/include -g assn1.o VTrackball.o -o assn1
-L/usr/local/lib -L/usr/lib -L/usr/X11R6/lib
-L/home/c13/Downloads/Mesa-3.0/lib -lglut -lGLU -lGL
-lXmu -lX11 -lMesaGLU -lMesaGL -lm -lXi > /usr/i486-linux-libc5/lib/libXt.so.6: undefined reference to `_Xsetlocale' > make: *** [assn1] Error 1 > > Am I linking in the correct libraries? > > I am using RedHat5.0, but I upgraded my libc and gcc (2.8.1) if that makes a > difference >
You are using an older version of Motif. Motif 2.0 from RedHat was
compiled assuming that libc did not have Locales and Xlib provided a
replacement routine. Since the later libc's have the setlocale routine,
the xlib headers now "#define _Xsetlocale setlocale". Anything compiled
with the old Xlib headers that calles _Xsetlocale, expects the routine
to be linked in.
You can fix this by either:
1) Buying a newer version of Motif (ie: specifically for RedHat 5.0)
2) Using lesstif rather than Motif
3) Not compiling or using the parts of Mesa that use Motif
4) Recompiling your X server and libraries with a special option to
include _Xsetlocale
5) Add the attached C routine into the Mesa build tree and modify the
Makefile. If it is linked into the Mesa library, then all Mesa programs
will link normally.
You will have the same problem with any other Motif application that you
compile.