I have written an OpenGL based program which uses i.a. libjpeg that I want to link statically so I can send it to someone who doesn't have all the libraries needed installed to allow for a dynamically linked executable to run.

As such I tried with giving the [b]-static[b] parameter to gcc.

x86_1$ make
gcc -O3 -c jpegloader.c
gcc --std=c99 -O3 -c --std=c99 -I/usr/include -L/usr/X11R6/lib main.c
gcc -static -o renderer main.o jpegloader.o --std=c99 -O3 -Wall -I/usr/include -L/usr/X11R6/lib -lglut -lGL -lGLU -lm -ljpeg
/usr/lib/gcc/i486-slackware-linux/4.2.4/../../../../i486-slackware-linux/bin/ld: cannot find -lglut
collect2: ld returned 1 exit status
make: *** [renderer] Error 1
Why would gcc claim that I'm missing GLUT? This works perfectly fine when I do dynamic linking -- i.e. omitting the -static argument.