Jump to content
  • Advertisement
Sign in to follow this  
greystreet

openGL setup VS2003

This topic is 4849 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 looked around and could not find much on it so here comes a newbie question. I just installed a fresh copy of windows XP and VS2003 on my machine. I would like to learn opengl, but dont really know where to begin. Do I need to install a openGL SDK like you do with directx? I was looking at the "red book" and tried one of there first examples and it through a bunch of errors when I tried to include <GL/gl.h> I guess I am looking for a bare bones getting opengl setup in VS2003 kinda tutorial. Looking through the red book makes sense, code wise, but until I get my compiler to like opengl Im not sure what I can really do. Any help would be greatly appreciated, Thanks all, Grey

Share this post


Link to post
Share on other sites
Advertisement
The errors you got would be nice, but I am going to guess that they are linker errors and that the problem is that you didn't link the library. GL comes pre-"installed" for most compilers, especially one as big as MSVS

Share this post


Link to post
Share on other sites
here are some quick solutions to common problems, these are MSVC specific.

place this somewhere in your source code:
#pragma comment(lib, "opengl32.lib")
#pragma comment(lib, "glu32.lib") // only if ur using <gl/glu.h>

also make sure you include <windows.h> BEFORE you include <gl/gl.h>

Cheers
-Danu

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • 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!