#8 linking probems with libglut


I have XFree86 4.0.1, NVidia's OpenGL libs, and SGI's libGLU 1.3 and SGI's libglut 3.7.

The configure script said

configure: error: GLUT library not found or too old version. 3.7
(beta) or later required.

I edited configure.in to skip this test by changing line 509 to

AC_TRY_LINK( , , have_glut_lib=yes, have_glut_lib=yes )

and ran autoconf and ./configure. The build went OK until:


c++ -O2 -Wall -fomit-frame-pointer -ffast-math -fexpensive-optimizations -malig n-loops=2 -malign-jumps=2 -malign-functions=2 -o tuxracer alglib.o audio.o aud io_data.o button.o course_load.o course_mgr.o course_quad.o course_render.o cred its.o debug.o error_util.o event_select.o file_util.o fog.o fonts.o fps.o game_c onfig.o game_logic_util.o game_type_select.o game_over.o gauss.o gl_util.o hash. o hier.o hier_cb.o hier_util.o hud.o image.o intro.o joystick.o keyboard.o keybo ard_util.o keyframe.o lights.o list.o listbox.o loop.o main.o mirror_course.o mu ltiplayer.o nmrcl.o part_sys.o paused.o phys_sim.o pic.o preview.o quadgeom.o qu adtree.o race_select.o racing.o render_util.o reset.o save.o screenshot.o splash _screen.o ssbutton.o string_util.o tcl_util.o tex_font_metrics.o textarea.o text ures.o track_marks.o tux.o tux_shadow.o ui_mgr.o ui_snow.o ui_theme.o view.o vie wfrustum.o -ltcl8.2 -lGL -lGLU -lglut
/usr/local/lib/libglut.so: undefined reference to `XGetExtensionVersion'
/usr/local/lib/libglut.so: undefined reference to `XFreeDeviceList'
/usr/local/lib/libglut.so: undefined reference to `XQueryDeviceState'
/usr/local/lib/libglut.so: undefined reference to `XListInputDevices'
/usr/local/lib/libglut.so: undefined reference to `XFreeDeviceState'
/usr/local/lib/libglut.so: undefined reference to `XOpenDevice'
/usr/local/lib/libglut.so: undefined reference to `XmuLookupStandardColormap'
/usr/local/lib/libglut.so: undefined reference to `XSelectExtensionEvent'
collect2: ld returned 1 exit status
make[2]: *** [tuxracer] Error 1
make[2]: Leaving directory `/home/me/dl/tuxracer-0.60.3/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/me/dl/tuxracer-0.60.3'
make: *** [all-recursive-am] Error 2

It seems that not all of the X libraries were being linked to.
I changed line 576 of configure.in from

LIBS="$LIBS $TR_LIBS -L/usr/X11R6/lib -lX11 -lXmu -lXi -lXext"

ran autoconf; ./configure; make, and the build finished and the program runs.


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks