Jump to content
  • Advertisement
Sign in to follow this  
schattenmaennlein

SDL and GL in VC6

This topic is 3930 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
Advertisement
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
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!