• Advertisement
Sign in to follow this  

Yet another Xcode & SDL problem..

This topic is 3232 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

Hi all. Sorry to bother you guys about such a simple problem again. Anyway, I'm trying to get my c++ app to display an image in fullscreen using SDL. However, when I use the code
temp = SDL_LoadBMP("image.bmp");
if (temp == NULL) {
	cout << "Unable to load bitmap: " << SDL_GetError();
	return 1;
}


The SDL_Error says
Quote:
Couldn't open image.bmp
However, I already added "image.bmp" into my Xcode project. Anyone know why it can't find/open image.bmp? Thanks in advance!

Share this post


Link to post
Share on other sites
Advertisement
Select your executable in the project list, hit command-I, go to the General tab, and you'll see a section that says "Set working directory to:". That's the directory where it's looking for your image. Probably you want to change that to be "project directory".

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement