Jump to content
  • Advertisement


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


Include problems

This topic is 5932 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
Microsoft''s gl.h requires that windows.h be included before it. Do something like this:

#ifdef _WIN32
#include <windows.h>
#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.

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!