See declaration of exit error (Visual studio 2010 issue)




hi

I have a massive weird error. I simply need to ask why this mind bending error occuring in visual studio 2010 but not 2008. Its giving me a right headache




1>------ Build started: Project: SCRORE INT TO CHAR, Configuration: Debug Win32 ------
1>  main.cpp
1>  DrawText.cpp
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\stdlib.h(353): error C2381: 'exit' : redefinition; __declspec(noreturn) differs
1>          c:\program files (x86)\microsoft visual studio 10.0\vc\include\glut.h(146) : see declaration of 'exit'
1>  Generating Code...
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Last edited on
Try switching #include <cstdlib> (or whatever standard library) with #include <gl/glut.h>.
now its saying glut is redefining the function and the problem still persists.

Weird. That always works for me (though I'm using 2008).
Well, you can always just comment the exit in glut.h (even though it's an ugly solution).
Topic archived. No new replies allowed.