Jump to content
  • Advertisement
Sign in to follow this  
nick2price

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.

If you intended to correct an error in the post then please contact us.

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 this post


Link to post
Share on other sites
Advertisement
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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!