OpenGL/GLUT & Microsoft Visual C++ .NET

I’m trying to move my GL app that uses GLUT to VC++ .NET (2003) since I have a problem running with VC++ 6.0 and Microsoft doesn’t support VC++6.0 anymore.

The problem with the move is that the exit function declaration in glut.h conflicts with the declaration in stdlib.h.

I’m using glut 3.7.6.

you must put #include<GL/glut.h> below of the old C libraries, i.e., stdlib.h, stdio.h, etc. See the follow code:

#include <stdlib.h>
#include <stdio.h>

#include <GL/glut.h>

remember that glut includes gl.h and glu.h, then shouldn’t put these in the list of headers (includes), use only glut.h