• Advertisement

Archived

This topic is now archived and is closed to further replies.

Dev-C++ and images

This topic is 5777 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''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.

Share this post


Link to post
Share on other sites
Advertisement
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

  • Advertisement