Sign in to follow this  

Trying to include OpenGL

This topic is 2832 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've been including SDL_OpenGL without problem but now I want to use GLee. I'm getting nearly 300 compiler errors in c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h. I put the GLee lib and header in my visual studio include and lib folders and including in this order. #include "GLee.h" #include "GL/GL.h" #include "SDL.h" Hope someone can help. Thanks.

Share this post


Link to post
Share on other sites
http://www.opengl.org/sdk/libs/GLee/

Quote:

Usage examples
To use GLee, include GLee.h from your code, then link to the GLee library (e.g. GLee.lib) or add GLee.c to your project.

To check for the ARB_multitexture extension and use it:
#include <gl\GLee.h> // (no need to link to gl.h)
...
if (GLEE_ARB_multitexture) //is multitexture support available?
{
glMultiTexCoord2fARB(...); //safe to use multitexture
}
else
{
//fallback
}


you dont need to include the header GL.h

Share this post


Link to post
Share on other sites
Hi. I went through this just the other day. I had to do the follwing;

1. Download the GLee package an unpack in a temporary folder.
2. Move the GLee.h file into the include\gl folder, and the GLee.lib into the lib folder of your Platform SDK and windows SDK installations. For me this was;
C:\Program Files\Microsoft Platform SDK\include | lib
C:\Program Files\Microsoft SDKs\Windows\v7.0a\include | lib
These will be different depending upon which SDK's you have installed and upon the IDE you are using and its configuration. Check the setting of your IDE and/or project to determine which are being used, or you could brute force this and use a file find/search and find all of the places gl.h exists :)

3. In your project you will need to add the GLee.lib along side opengl32.lib and glu.lib so the linker can resolve.

4. Finally, you have to have the right includes in your headers otherwise you still continue to get errors. I was down to one which said "gl.h was found before glee.h", which meant I had to search every header for gl.h includes and remove them. In my main program cpp file I put #include <gl\GLee.h> and following that #include <gl\glu.h>. That was all. As MatthewS said, no need to gl.h to be included. Occasionally a header required a <gl\GLee.h>. Depending upon how well structured your headers and cpp files are you might or might not be engaged in a little cleanup.

HTH
F541

Share this post


Link to post
Share on other sites

This topic is 2832 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this