954,504 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

OpenGL c++ 'glut' file error NEED HELP

I am currently writing a program that uses OpenGL and so it uses the include file:
#include
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: 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.

Kontext
Newbie Poster
3 posts since Mar 2011
Reputation Points: 10
Solved Threads: 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"?

daviddoria
Posting Virtuoso
1,996 posts since Feb 2008
Reputation Points: 437
Solved Threads: 204
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: