Advertisement

Dev-C++ and images

Started by June 28, 2002 10:14 AM
3 comments, last by Ichigo 22 years, 4 months ago
I''m wrighting a simple program in SDL in Dev-C++ , all it realy does is draw one .BMP over another one, as an extra feature it draws some nlue pixels too! I''ve run in to a small problem. When I run the .EXE file from a textpromt or from explorer, everyting works just fine. The strange thing is that when I push the "Run project" button in Dev-C++ the program runns.. But none of the imagefiles (.BMP) are loaded.
Have a nice day ^^
Check the image paths... Maybe the working directory that the IDE runs the program from is different from wherever you''re running it when you''re at the command prompt.
Advertisement
Which version are you using? I had this problem in 4.9.3.0 (beta3) but it went away in 4.9.4.0 (beta4).
quote: Original post by Melraidin
Check the image paths... Maybe the working directory that the IDE runs the program from is different from wherever you''re running it when you''re at the command prompt.


I changed


  bg = SDL_LoadBMP("Asuka.bmp");img = SDL_LoadBMP("eva03.bmp");  


to


  bg = SDL_LoadBMP("C:/Documents and Settings/Jakob/Mina dokument/my tests/Asuka.bmp");img = SDL_LoadBMP("C:/Documents and Settings/Jakob/Mina dokument/my tests/eva03.bmp");  


And now it works jsut fine.

But there should be a better way to do it.

Maybe I shoud just update to the latest Dev-C++ vertion.
Have a nice day ^^
If you only put the FileName in it,
you MUST put the BMP''s in the same dir as the EXE.

This topic is closed to new replies.

Advertisement