Your images show your project setup (include directories and so forth), but it sounds like this is a run-time problem, correct? (That is, your program is compiling and linking correctly; it’s just not behaving as you expect.)
In any case, the first thing I’d recommend is to make sure you’re checking return values where appropriate. For example, make sure the function that loads the image isn’t returning null.
Could not Load “Background.bmp” because SDL_UpperBlit: passed a Null surface…
you added it after the call, not before it like I said. But that’s okay. Basically, SDL couldn’t load the bitmap. Are you sure it’s in the same folder as the executable, and that it’s actually a valid .bmp?------------------------
EM3 Nathaniel Fries, U.S. Navy
So I put Picture of Background in MingW folder and when I run the program and I got the picture Working! YAY
Thank you Nathaniel J Fries
P.S. IF you got any Good Tips about SDL then let me know please
I do.
Update to SDL 1.3, it’s way better. You won’t find a tutorial though, so maybe wait until you’re familiar with 1.2 first.
Use SDL_Image and use PNGs. They’re smaller.
Use RLE_ACCEL for surfaces in 1.2. You’ll get a few more frames.
Your drawing code should be in an infinite loop that exits based on user input.
If SDL is your first foray into real programming, you should be reading general programming tutorials first. You’ll understand SDL much better that way.
There’s about a million open-source games using SDL. Reference them.------------------------
EM3 Nathaniel Fries, U.S. Navy