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

Started by
21 comments, last by NightCreature83 12 years, 11 months ago
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?
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.

LazyFoo's SDL tutorials: http://lazyfoo.net/S...rials/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.


Wow, that guy sure ain't lazy. o.o
Thanks.
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?
make sure the file hello.bmp exists and is located at the right path.
Its there and in the right path, but It still doesn't work. :c
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.
I guess I'll go over the setting up part once more.
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());
}
SDL_LoadBMP failed: Couldn't open hello.bmp

That's what I got in stdout.

This topic is closed to new replies.

Advertisement