0

I am currently writing a program that uses OpenGL and so it uses the include file:
#include <GL/glut.h>
Now when I try to compile and run the program I get this message in the error folder:
"fatal error C1083: Cannot open include file: 'glut': No such file or directory"

Lastly, I have already tried to remove the GL/ to keep it just: <glut.h> but then another error message comes along. I have also already downloaded the openGL folder and placed it in the right Visual C++ folder and I have used OpenGL in the past on the same computer, program etc, so I know that it is not the file that is missing or anything like that.
If you think you have the answer, please help because ive tried many things and had no success.

2
Contributors
1
Reply
2
Views
6 Years
Discussion Span
Last Post by daviddoria
0

You have to make sure that the GL directory (if you use gluh.h) or the directory that contains the GL folder (if you use GL/glut.h) is on your "include path". Depending on your environment (Visual Studio, etc) the method to set the include path varies. As a test, try

#include "/full/path/to/GL/glut.h"

If that works, then google "your environment include path" to see how to set it.

I am confused why it is looking for "glut" when you told it to look for "glut.h"?

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.