SDL LoadBMP Problem

Whether you're a newbie or an experienced programmer, any questions, help, or just talk of any language will be welcomed here.

Moderator: Coders of Rage

User avatar
eatcomics
ES Beta Backer
ES Beta Backer
Posts: 2528
Joined: Sat Mar 08, 2008 7:52 pm
Location: Illinois

Re: SDL LoadBMP Problem

Post by eatcomics »

Wow... Still having problems with this??? So just a recap, make sure your bmp is in the folder that your executable/project file is in... Make sure your loading a bmp not a png, and that's all I can think of...
Image
RandomDever
Chaos Rift Regular
Chaos Rift Regular
Posts: 198
Joined: Thu Mar 26, 2009 8:42 pm
Current Project: My Engine
Programming Language of Choice: C++

Re: SDL LoadBMP Problem

Post by RandomDever »

I tried the if !image and also the 0, 0 thing and it just quits.
User avatar
dandymcgee
ES Beta Backer
ES Beta Backer
Posts: 4709
Joined: Tue Apr 29, 2008 3:24 pm
Current Project: https://github.com/dbechrd/RicoTech
Favorite Gaming Platforms: NES, Sega Genesis, PS2, PC
Programming Language of Choice: C
Location: San Francisco
Contact:

Re: SDL LoadBMP Problem

Post by dandymcgee »

Also confirm that you have all of the DLLs in the folder, just to make sure. Usually it tells you if you have one missing, but not always. I had this very same problem when I forgot to put libpng in the directory.
Falco Girgis wrote:It is imperative that I can broadcast my narcissistic commit strings to the Twitter! Tweet Tweet, bitches! :twisted:
RandomDever
Chaos Rift Regular
Chaos Rift Regular
Posts: 198
Joined: Thu Mar 26, 2009 8:42 pm
Current Project: My Engine
Programming Language of Choice: C++

Re: SDL LoadBMP Problem

Post by RandomDever »

Here's a list of the dlls:
  • jpeg.dll
    libpng12-0.dll
    libtiff-4.dll
    SDL.dll
    SDL_image.dll
    zlib1.dll
RandomDever
Chaos Rift Regular
Chaos Rift Regular
Posts: 198
Joined: Thu Mar 26, 2009 8:42 pm
Current Project: My Engine
Programming Language of Choice: C++

Re: SDL LoadBMP Problem

Post by RandomDever »

:cry: :cry: :cry: :cry: :cry: :cry: :cry: :cry: :cry: :cry: :cry: :cry: :cry: :cry: :cry: :cry:
RandomDever
Chaos Rift Regular
Chaos Rift Regular
Posts: 198
Joined: Thu Mar 26, 2009 8:42 pm
Current Project: My Engine
Programming Language of Choice: C++

Re: SDL LoadBMP Problem

Post by RandomDever »

okay I just used source code from lazyfoo and it worked the same.
Vista? You think?
User avatar
dandymcgee
ES Beta Backer
ES Beta Backer
Posts: 4709
Joined: Tue Apr 29, 2008 3:24 pm
Current Project: https://github.com/dbechrd/RicoTech
Favorite Gaming Platforms: NES, Sega Genesis, PS2, PC
Programming Language of Choice: C
Location: San Francisco
Contact:

Re: SDL LoadBMP Problem

Post by dandymcgee »

Nobody can really help you with this problem. We can't possibly tell you how to fix it when we don't know what's wrong, you're just going to have to play around with some settings, or maybe even just find a tutorial and reinstall your IDE while following that tutorial exactly. I'm sure it's something stupid you missed, it always is.

I wish there was more I could tell you, but the setup you've described should work perfectly, and if it doesn't you need to figure out what you didn't mention. :(
Falco Girgis wrote:It is imperative that I can broadcast my narcissistic commit strings to the Twitter! Tweet Tweet, bitches! :twisted:
User avatar
MarauderIIC
Respected Programmer
Respected Programmer
Posts: 3406
Joined: Sat Jul 10, 2004 3:05 pm
Location: Maryland, USA

Re: SDL LoadBMP Problem

Post by MarauderIIC »

RandomDever wrote:I tried the if !image ... and it just quits.
Then the image isn't being loaded.
I realized the moment I fell into the fissure that the book would not be destroyed as I had planned.
RandomDever
Chaos Rift Regular
Chaos Rift Regular
Posts: 198
Joined: Thu Mar 26, 2009 8:42 pm
Current Project: My Engine
Programming Language of Choice: C++

Re: SDL LoadBMP Problem

Post by RandomDever »

It works! I just didn't know it because VC++ is stupid..
I opened up the exe manually and it worked fine wtf.
VC++ didn't open it correctly i guess.
User avatar
MarauderIIC
Respected Programmer
Respected Programmer
Posts: 3406
Joined: Sat Jul 10, 2004 3:05 pm
Location: Maryland, USA

Re: SDL LoadBMP Problem

Post by MarauderIIC »

Image has to be in same directory as source code when run through VC++. Image has to be in same directory as executable when executable is run manually.
I realized the moment I fell into the fissure that the book would not be destroyed as I had planned.
RandomDever
Chaos Rift Regular
Chaos Rift Regular
Posts: 198
Joined: Thu Mar 26, 2009 8:42 pm
Current Project: My Engine
Programming Language of Choice: C++

Re: SDL LoadBMP Problem

Post by RandomDever »

Ahhh.
Спасибо
"thank you"
User avatar
MarauderIIC
Respected Programmer
Respected Programmer
Posts: 3406
Joined: Sat Jul 10, 2004 3:05 pm
Location: Maryland, USA

Re: SDL LoadBMP Problem

Post by MarauderIIC »

Reading through it, it looks like nobody was really clear about that. Sorry, I thought somebody had said it. eatcomics had it closest when he said "project folder". I'm assuming that "thank you" means it works now?
I realized the moment I fell into the fissure that the book would not be destroyed as I had planned.
RandomDever
Chaos Rift Regular
Chaos Rift Regular
Posts: 198
Joined: Thu Mar 26, 2009 8:42 pm
Current Project: My Engine
Programming Language of Choice: C++

Re: SDL LoadBMP Problem

Post by RandomDever »

Yes it does. XD!
Post Reply