Sign in to follow this  

SDL and GL in VC6

This topic is 3717 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

This works: #include "SDL.h" int main( int argc, char* argv[] ) { // Body of the program goes here. return 0; } ----------------------- This doesnt: #include "SDL.h" #include "gl/gl.h" //<- thats the new line int main( int argc, char* argv[] ) { // Body of the program goes here. return 0; } c:\archivos de programa\microsoft visual studio\vc98\include\gl\gl.h(1152) : error C2501: 'WINGDIAPI' : missing storage-class or type specifiers my project parameters: opengl32.lib sdl.lib sdlmain.lib kernel32.lib user32.lib wheres my mistake? **EDIT** okay, I have to include the <windows.h> also. Why can I use DevC++ without including windows? [Edited by - schattenmaennlein on October 13, 2007 7:18:25 PM]

Share this post


Link to post
Share on other sites
Quote:

**EDIT**

okay, I have to include the <windows.h> also. Why can I use DevC++ without including windows?

No you don't, including windows.h will make it impossible for your app to run in other os's than windows (the reason you want to use SDL to begin with...).
In your SDL include directory is SDL's version of the gl header: sdl_opengl.h. Use that one instead, as it doesn't require platform-specific headers (like windows.h)

EDIT: you'll still have to link to opengl32.lib, as usual.

Share this post


Link to post
Share on other sites

This topic is 3717 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