error C2381: 'exit' : redefinition Debugging



Solution:


Cause:

The stdlib.h which ships with the recent versions of Visual Studio has a different (and conflicting) definition of the exit() function. It clashes with the definition in glut.h.

Solution:

Override the definition in glut.h with that in stdlib.h. Place the stdlib.h line above the glut.h line in your code.

#include <stdlib.h>
#include <GL/glut.h>


덧글

댓글 입력 영역