Jump to content
  • Advertisement
Sign in to follow this  
xzbobzx

How do I set up SDL in visual C++ 2010 express?

This topic is 2603 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 searched for tutorials but couldn't find any good ones, so I decided to ask here, how do I set up SDL in Visual C++ 2010 express?

Share this post


Link to post
Share on other sites
Advertisement
LazyFoo's SDL tutorials: http://lazyfoo.net/SDL_tutorials/index.php

The explanations are very clear and easy to follow. Start with Lesson 1 and you are good to go. If you do not understand any of the steps, just post again to ask.

Share this post


Link to post
Share on other sites
So I tried lesson 1, all compiles fine.
But when I run the program it's just a black screen without any picture on it, what have I done wrong?

Share this post


Link to post
Share on other sites
make sure the file hello.bmp exists and is located at the right path.

Share this post


Link to post
Share on other sites
have you written the code or did you just copy it? It is easy to miss a line. The full source can be downloaded at the bottom of the page. If that source don't work you have probably not set up SDL properly.

Share this post


Link to post
Share on other sites
When I think about it, a blank window sounds more like an error in the code than SDL being not properly set up.
Try add the following code after hello = SDL_LoadBMP( "hello.bmp" ); :
if (!hello)
{
printf("SDL_LoadBMP failed: %s\n", SDL_GetError());
}

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!