-1

when I run my open gl project, I face with this error :

error C2381: 'exit' : redefinition; __declspec(noreturn) differs

I used visual studio 2010 before, and don't have any problem. but since I use visual studio 2012, I face this error.
How can I solve it?

genpfault
  • 51,148
  • 11
  • 85
  • 139
Saman
  • 5,173
  • 6
  • 17
  • 17
  • 3
    Here is something that could help: http://social.msdn.microsoft.com/Forums/en-US/4cf463c1-5fee-4daa-b135-be8b06ab7f8f/error-c2381-exit-redefinition-declspecnoreturn-differs?forum=Vsexpressvc – MonkeyZeus Jan 28 '14 at 00:05
  • You should search for error first, Both Bing and Google's first result gave the link mentioned by @MonkeyZeus. – Ajay Jan 28 '14 at 04:24
  • possible duplicate of [GLUT exit redefinition error](http://stackoverflow.com/questions/14402/glut-exit-redefinition-error) – zinking Jan 28 '14 at 05:41
  • @Ajay I have come to terms that StackOverflow must translate to `www.googleitforme.com` in several, if not all, languages. – MonkeyZeus Jan 28 '14 at 13:20

1 Answers1

0

Related Question

or this... To fix the error, right click on the project name in the Solution Explorer tab and select Properties -> C/C++ -> Preprocessor -> Preprocessor definitions and append GLUT_BUILDING_LIB to the existing definitions, seperated by semicolons.

As per @Alex the solution worked before because some these switches are correctly defined.

Community
  • 1
  • 1
zinking
  • 5,561
  • 5
  • 49
  • 81