I’ve been learning OpenGL for a little while and I got sample codes to analyze sometimes. In some cases, I got errors like “Can not open file GLUT.h”, “Can not open file GLUT32.lib”..and stuff like this. First I thought I was because of the corruption of my VS libraries and wanna fix it up. After searching around, I realized that neither XP nor VS2005 come with Glut with them. And to save the world on this occasion, you have to do the following:
1. Get the newest version of GLUT here: GLUT 3.7.6 for Windows.
2.
| File | Location |
| glut32.dll | C:\WINDOWS\system\ (or system32) |
| glut32.lib | C:\Program Files\Microsoft Visual Studio 2005\VC\PlatformSDK\Lib |
| glut.h | C:\Program Files\Microsoft Visual Studio 2005\VC\PlatformSDK\Include\gl |
3. Make sure your Visual C++ project links in the GLUT/gl/glu libraries. This can be difficult to find. In Visual Studio 2003.NET, I think this is located in:
- Menu: “Project -> (your-project-name) Properties”
- Tab: “Configuration Properties -> Linker -> Input”
- Under “Additional Dependancies”, add “glut32.lib opengl32.lib glu32.lib”
** Sharing of programs that uses glut32 must includes glut32.dll also**

