I’m compiling several openGL programs using glut in Visual C++.NET, and I am having an annoying error. The error I receive is as follows:
c:\Program Files\Microsoft Visual Studio .NET\Vc7\include\stdlib.h(251): error C2381: ‘exit’ : redefinition; __declspec(noreturn) differs
glut.h redefines this line in stdlib.h:
_CRTIMP __declspec(noreturn) void __cdecl exit(int);
to:
extern _CRTIMP void __cdecl exit(int);
I applied a quick (bad) fix by modifying glut.h to the be the same as stdlib.h, but this causes my computer to crash horribly if I attempt to re-run a program that had previously crashed. I have tried using the downloaded glut.h/dll/lib and I have compiled them myself, both have this problem with the VC++.NET compiler.
Any help would be greatly appreciated.
Ghost