Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Mr_Black

OpenGL OpenGL error using MSVC

This topic is 6710 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''m hhaving trouble wrapping up my OGL functions in a class, as MSVC does not seem to be defining the __cplusplus macro. Is there any way of booting the marco in thhe teeth and foorcing it to be defined. More elegent solutions are also welcome. Thanks in advance. --Mat

Share this post


Link to post
Share on other sites
Advertisement
1. If you are using MFC, include stdafx.h before ANY other include.
2. you could try #define __cplusplus

#pragma DWIM // Do What I Mean!
~ Mad Keith ~
**I use Software Mode**

Share this post


Link to post
Share on other sites
I have already tried to define the __cplusplus macro, but it is a reserved name and cannot be redefined.

Share this post


Link to post
Share on other sites
And why does it lead to problems compiling wrapper classes for OpenGL?
( what''s the specific error message, and where does it occur )


#pragma DWIM // Do What I Mean!
~ Mad Keith ~
**I use Software Mode**

Share this post


Link to post
Share on other sites
Sorry I forgot about including an error message. I was relying on psycic coders

Ok the errors I''m getting are as follows:

evgr.cpp
c:\programme\microsoft visual studio\vc98\include\gl\gl.h(1152) : error C2144: syntax error : missing '';'' before type ''void''
c:\programme\microsoft visual studio\vc98\include\gl\gl.h(1152) : error C2501: ''WINGDIAPI'' : missing storage-class or type specifiers
c:\programme\microsoft visual studio\vc98\include\gl\gl.h(1152) : fatal error C1004: unexpected end of file found

I have split thhe wrapper up into 2 files, all that is in the .h file is the class definition, yes there is a semi colon at the end of the class definition, this just contains the constructor. And the .cpp file contains the implimentataion of the constructor which is empty.

Share this post


Link to post
Share on other sites
Sounds like you may not have included all the necessary windows stuff before including the gl.h...


#pragma DWIM // Do What I Mean!
~ Mad Keith ~
**I use Software Mode**

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!