Compilation errors

I am trying to compile a simple program (OpenGL/GLUT), and I keep getting errors on my glut functions “undefined reference…”. I had the same errors with the gl functions until I linked -lGL when compiling. I can’t figure out what I need to link to get the glut functions to work properly. I know that it probably differs depending on where the files are housed, but can anyone point me in the correct direction as to what needs to be linked to get glut to find the functions that it needs?

Addendum:

I am working remotely on a Unix system through ssh, on which I’m not the administrator or the person who set it up. I looked through the /usr/include/GL directory and other directories to which the compiler references when looking for header files and the like and found glut.h and gl.h and all the header files that I see referenced in tutorials. I am going off of the basis that all the files that I need to compile the program are there. I just am not sure exactly what needs to be linked for glut at compilation. I don’t know if this information helps at all, but any information would be greatly appreciated.

Hi !

-lglut

You need the libglut library.

Mikael