Skip to main content
GameDev.net gamedev.net
🔒 Locked

problem compiling program

Started by nick2price Nov 30, 2008 at 10:31 AM 1 replies 1.6k views
Original Post
nick2price
nick2price
I reinstalled visual c++ EE and i have a problem i had the first time. Its an error when i compile saying
 1>Compiling...
1>main.cpp
1>c:\program files\microsoft visual studio 9.0\vc\include\stdlib.h(371) : error C2381: 'exit' : redefinition; __declspec(noreturn) differs
1>        c:\glut\include\gl\glut.h(146) : see declaration of 'exit'
1>c:\program files\microsoft visual studio 9.0\vc\include\stdlib.h(371) : warning C4985: 'exit': attributes not present on previous declaration.
1>        c:\glut\include\gl\glut.h(146) : see declaration of 'exit'
1>skybox.cpp
1>c:\program files\microsoft visual studio 9.0\vc\include\stdlib.h(371) : error C2381: 'exit' : redefinition; __declspec(noreturn) differs
1>        c:\glut\include\gl\glut.h(146) : see declaration of 'exit'
1>c:\program files\microsoft visual studio 9.0\vc\include\stdlib.h(371) : warning C4985: 'exit': attributes not present on previous declaration.
1>        c:\glut\include\gl\glut.h(146) : see declaration of 'exit'
1>Generating Code...
1>Build log was saved at "file://f:\Graphics, C++\skybox\skybox\Debug\BuildLog.htm"
1>skybox - 2 error(s), 2 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
When i click on the error it takes me to stdlib here
 #ifndef _CRT_TERMINATE_DEFINED
#define _CRT_TERMINATE_DEFINED
_CRTIMP __declspec(noreturn) void __cdecl exit(_In_ int _Code);
_CRTIMP __declspec(noreturn) void __cdecl _exit(_In_ int _Code);
_CRTIMP void __cdecl abort(void);
#endif
I am pretty sure the error was because the first exit is missing a _ the problem is i cant remember how i made the change before in windows vista. I cant edit it in vs or in notepad because when i save i get refused as if the file is protected. Is there anyway to sort this problem? cheers
nick2price
nick2price
I have stdlib above GL/GLUT and the other thing i try just throws millions of errors. I got this error on my uni's machines also, and all i done was add a _ to the top exit and saved it. I cant do this on vista however because it seems prohibited.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.