Jump to content
  • Advertisement
Sign in to follow this  

Yet another Xcode & SDL problem..

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

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!