I was doing some OpenGL programming in C++.
This is part of my code:
#include <time.h>
#include <windows.h>
#include <gl/gl.h>
#include <gl/glu.h>
#include <gl/glut.h> <<< Error here "Cannot open source file gl/glut.h"
How can I fix this?
EDIT: I am using Microsoft Visual C++ Express Edition. Sorry forgot to mention it
You probably haven’t installed GLUT:
If you do not have GLUT installed on your machine you can download it from:
http://www.xmission.com/~nate/glut/glut-3.7.6-bin.zip (or whatever version)
GLUT Libraries and header files are
• glut32.lib
• glut.h
Source: http://cacs.usc.edu/education/cs596/OGL_Setup.pdf
EDIT:
The quickest way is to download the latest header, and compiled DLLs for it, place it in your system32 folder or reference it in your project. Version 3.7 (latest as of this post) is here:
http://www.opengl.org/resources/libraries/glut/glutdlls37beta.zip
Reprinted from here