OpenGL on Vista 64 bit stdlib error message. Code runs fine on 32 bit

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

Page 1 of 1

6 Replies - 3334 Views - Last Post: 10 June 2010 - 11:46 PM Rate Topic: -----

#1 wartech   User is offline

  • D.I.C Head
  • member icon

Reputation: 10
  • View blog
  • Posts: 203
  • Joined: 16-October 06

OpenGL on Vista 64 bit stdlib error message. Code runs fine on 32 bit

Posted 26 March 2009 - 06:37 PM

I have a class project that was running fine at school. I am trying to run on vista 64 bit at home but am getting three error messages pertaining to stdlib. Here is the error message.

OpenGL - Error 2 error C2381: 'exit' : redefinition; __declspec(noreturn) differs c:\program files (x86)\microsoft visual studio 9.0\vc\include\stdlib

I have also seen this same error in a lot of sample code that I find online and attempt to run. Is this a visual studio 2008 or vista 64 bit issue?

Your help is appreciated.

Is This A Good Question/Topic? 0
  • +

Replies To: OpenGL on Vista 64 bit stdlib error message. Code runs fine on 32 bit

#2 stayscrisp   User is offline

  • フカユ
  • member icon

Reputation: 1040
  • View blog
  • Posts: 4,326
  • Joined: 14-February 08

Re: OpenGL on Vista 64 bit stdlib error message. Code runs fine on 32 bit

Posted 27 March 2009 - 01:12 AM

Hi

Could you post the code please then it will be easier to help you :)
Was This Post Helpful? 0
  • +
  • -

#3 wartech   User is offline

  • D.I.C Head
  • member icon

Reputation: 10
  • View blog
  • Posts: 203
  • Joined: 16-October 06

Re: OpenGL on Vista 64 bit stdlib error message. Code runs fine on 32 bit

Posted 29 March 2009 - 03:55 PM

No changes were made in the code from school to home. The solution ended up being that I had to include the header

#include <stdlib.h>
before
#include <gl\glut.h>

That solved the problem!
Was This Post Helpful? 0
  • +
  • -

#4 stayscrisp   User is offline

  • フカユ
  • member icon

Reputation: 1040
  • View blog
  • Posts: 4,326
  • Joined: 14-February 08

Re: OpenGL on Vista 64 bit stdlib error message. Code runs fine on 32 bit

Posted 30 March 2009 - 08:22 AM

Still would have been helpful to know the language and platform :D it always is.

But good work on solving your issue :^:
Was This Post Helpful? 0
  • +
  • -

#5 wartech   User is offline

  • D.I.C Head
  • member icon

Reputation: 10
  • View blog
  • Posts: 203
  • Joined: 16-October 06

Re: OpenGL on Vista 64 bit stdlib error message. Code runs fine on 32 bit

Posted 27 April 2009 - 11:00 AM

Sorry I must of missed this message. I am using Visual Studio 2008, vista 64 bit, and glut.
Was This Post Helpful? 0
  • +
  • -

#6 Jubb   User is offline

  • D.I.C Head

Reputation: 6
  • View blog
  • Posts: 88
  • Joined: 06-May 09

Re: OpenGL on Vista 64 bit stdlib error message. Code runs fine on 32 bit

Posted 06 May 2009 - 12:12 PM

Quote

OpenGL - Error 2 error C2381: 'exit' : redefinition; __declspec(noreturn) differs c:\program files (x86)\microsoft visual studio 9.0\vc\include\stdlib


Did you remember to build it as a x64 project? It looks like it's trying to use the x86 (32-bit) compiler. x64 only uses the fastcall calling convention, which is why it has a problem with __declspec.

Also, I don't know much about openGL but maybe you're including the 32-bit version(if there are different versions?) Make sure all the libraries and code you're working with are 64bit.
Was This Post Helpful? 0
  • +
  • -

#7 Guest_nimeyeporedel*


Reputation:

Re: OpenGL on Vista 64 bit stdlib error message. Code runs fine on 32 bit

Posted 10 June 2010 - 11:46 PM

tanx
Was This Post Helpful? -1

Page 1 of 1