cant link glut.h

whenever i compile in linux a program with the statement : #include <GL/glut.h> i get an error message that glut.h not found, but i have the file in /usr/X11R6/include/glut.h directory.

try
#include glut.h

I assume that is your system path you are talking about. try <glut.h> and “glut.h” but link to it when compiling -L /usr… -I /usr…

I have the files in /usr/include/GL/ you can copy them to that location or compile with:
g++ -I/usr/X11R&/include/ …

The standard way is to have the OpenGL include files in a GL directory in the usual include directory.

Thanks for the reply , actually I don’t know to set the include path.

Originally posted by Gavin:
[b]try
#include glut.h

I assume that is your system path you are talking about. try <glut.h> and “glut.h” but link to it when compiling -L /usr… -I /usr…[/b]