During OpenGL development, fatal error C1083: can’t open include file: “GL/glut. H”: no such file or directory
I use vs2012 to write a simple OpenGL program, which always prompts when running:
Fatal error C1083: unable to open include file: “GL/glut. H”: no such file or directory;
Or fatal error C1083: cannot open include file: “GL/glaux. H”: no such file or directory;
At this time, the corresponding operations are as follows:
1. Download glut Toolkit: glut_ 37beta. Rar
2. Untie the downloaded compressed package and you will get five files, including glu32. Lib; glut32.dll,glut32.lib; Glut.dll, glut. H, glut. Lib
3. Put the extracted glut. H and glux. H in the folder C: program files (x86) and windows kits (8.0) and include (UM)( Note: the directory where each person installs vs is different, and the operation is based on the actual situation)
4. Put the extracted glut.lib, glut32.lib and glaux.lib in the static function library, which is located in the folder C: program files (x86) – Windows kits (8.0) – lib (win8) – um (x86)
5. If it still can’t work, put glut32.dll back to C: Windows/syswow64
6. Compile again. If there is still an error, change the original name of the header file # include & lt; GL/glut.h> Include & lt; glut.h>。
///
Download address of glut in Windows Environment: (about 150k in size)
http://www.opengl.org/resources/libraries/glut/glutdlls37beta.zip
This is the first article I saw when I configured the environment. Later, I made a mistake and used the method of this article to solve the problem https://www.pianshen.com/article/78231370291/