# problem compiling program

This topic is 3665 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

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

##### Share on other sites
Doing a google search for the error message came up with this: Clicky.

##### Share on other sites
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.

1. 1
2. 2
3. 3
Rutin
13
4. 4
5. 5

• 26
• 10
• 9
• 9
• 11
• ### Forum Statistics

• Total Topics
633696
• Total Posts
3013397
×