Jump to content
  • Advertisement

Archived

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

Spearhawk

Include problems

This topic is 5849 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 sorry if this has been explained in some erlier post, I''d use search to find out but it''s temporarly disabled (anyone knows when it''ll be back?) so i can''t. I''m having problems with including standard headers like the gl.h For example I got this class, CSprite, in CSprite.h that needs the gl.h file, then I got the class CObject, that needs to include CSprite.h and use the gl.h and then finaly CObject.h needs to be included in main.h that also needs the gl.h. When I try to include gl.h in all needed files I often get compiler errors that complain of errors inside the gl.h file. Obvius this is casue I have include it wrong somewhere, casue if I only include it in one file things work fine (except of course that I can''t use the other two classes). What is the correct way to include gl.h?

Share this post


Link to post
Share on other sites
Advertisement
Microsoft''s gl.h requires that windows.h be included before it. Do something like this:

#ifdef _WIN32
#include <windows.h>
#endif
#include <GL/gl.h>

Is that your problem?

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!