The following is the command to use when compiling on Sandcastle to have freeimage, glut and X-window working. gcc -O2 -s -o $1 $1.c -L /usr/X11R6/lib64 -lc /usr/local/lib64/libfreeimage.a /usr/local/lib64/libglut.a -lGL -lGLU -lX11 -lXmu -lXi -lXext -lm where $1 is the filename without the .c extension. Furthermore, when including the header files in the program make use of the following: #include #include "/usr/local/include/FreeImage.h" #include "/usr/local/include/GL/glut.h" -- Pascal Comte.