Installing GLUT3.7 under Fedora Core 1 (Linux) REMARK: This document assumes that Mesa3D library(and therefore all OpenGL libraries) is already installed. If you installed Fedora(and many other popular distributions), Mesa is normally installed as it is a dependency for many applications. If in doubt, you can check this by 'rpm -qa | grep Mesa'. This should list these two, and perhaps more. XFree86-Mesa-libGLU-4.3.0-42 XFree86-Mesa-libGL-4.3.0-42 REMARK: The installation sequence is heavily borrowed from Speed King's walkthrough, correcting a few minor errors. Original document is located at http://www.geocities.com/mhoare2000/linux/instglut.html REMARK: If compiled with the script below, the executable may complain for DRI / TCL support. TCL(Transformation/Clipping/Lighting) is surely an important functions in OpenGL, but if your video chipset is reasonably recent, this may be ignored. I've tested with ATI Radeon M16 and Riva TNT M16, and they both work flawlessly. 1. First download Glut3.7 from OpenGL website. (http://www.opengl.org/resources/libraries/glut/glut-3.7.tar.gz) 2. Follow the following commands (assuming you're super user for install purposes) cd /usr/src tar -xvzf glut-3.7.tar.gz cd glut-3.7 cd linux cp Glut.cf .. cd .. Edit Glut.cf: remove any Mesa references. Replace any -lMesaGL -lMesaGLU with -lGL -lGLU if needed. In particular, replace: OPENGL = $(TOP)/../lib/libMesaGL.so GLU = $(TOP)/../lib/libMesaGLU.so with: OPENGL = -lGL GLU = -lGLU ./mkmkfiles.imake cd lib/glut cp /usr/src/glut-3.7/linux/Makefile . Edit the Makefile: remove any Mesa references. Replace any -lMesaGL -lMesaGLU with -lGL -lGLU if needed. In particular, replace: OPENGL = $(TOP)/../lib/libMesaGL.so GLU = $(TOP)/../lib/libMesaGLU.so with: OPENGL = -lGL GLU = -lGLU make ln -s libglut.so.3.7 libglut.so ln -s libglut.so.3.7 libglut.so.3 cp -d libglut.* /usr/lib cd .. make cd gle -- make a shared lib for libgle gcc -shared -o libgle.so.3.7 *.o ln -s libgle.so.3.7 libgle.so ln -s libgle.so.3.7 libgle.so.3 cp -d libgle.* /usr/lib cd .. cd mui -- make a shared lib for libmui gcc -shared -o libmui.so.3.7 *.o ln -s libmui.so.3.7 libmui.so ln -s libmui.so.3.7 libmui.so.3 cp -d libmui.* /usr/lib cd ../../man/glut make install.man /sbin/ldconfig cd /usr/src/glut-3.7/include/GL cp * /usr/include/GL cd ../../progs/demos/ideas -- edit Makefile: $(TOP)/../lib/libGLU.so -> /usr/lib/libGLU.so $(TOP)/../lib/libGL.so -> /usr/lib/libGL.so make ./ideas 3. You can read through the Makefile located at /usr/src/glut-3.7/progs/demos/ideas/Makefile. I'm attaching a short script that will take 2 parameters: 1) source file 2) executable and compile. #!/bin/sh if [ $# -ne 2 ]; then echo "Usage: compile source binary" 1>&2 exit 1 fi SOURCE=$1 BINARY=$2 COMPOPT="gcc -o "$BINARY" -L/usr/X11R6/lib /usr/lib/libglut.so /usr/lib/libGLU.so /usr/lib/libGL.so -lXmu -lXi "$SOURCE $COMPOPT