View Full Version : problem of compling OpenGL+SDL in MS VC++6

06-13-2004, 05:44 PM
I need to write crossplatform OpenGL code. glut and SDL is a good solution. I prefer to SDL+OpenGL. Compling SDL+OpenGL code is OK in linux. But the same code in VC failed, there are many errors in gl.h. I have added glu32.lib, openg32.lib, SDL.lib, SDLmain.lib into project.

06-13-2004, 07:37 PM
If you're looking for help, you might consider posting the actual errors that you are getting. We can't actually diagnose the problem until then.

06-13-2004, 07:45 PM
You probably need to include windows.h before gl.h.

06-16-2004, 01:45 AM
This thread is a few days old, but I better point out that you should include "SDL_opengl.h" instead of gl.h because of the portability issues. As pointed out above, you need windows.h for Windows, but the GL headers are "OpenGL/gl.h" on the Mac.