Jump to content
  • Advertisement
Sign in to follow this  
click170

Trouble following Lazyfoo tutorials with Xcode

This topic is 2322 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,
I'm trying to get more familiar with SDL by going through the lazyfoo tutorials, and I'm only on lesson 01, but I'm having trouble with relative paths and getting 'hello.bmp' to load properly with Xcode.

If I go to Project -> Edit Active Executable and changing Set The Working Directory to 'Project Directory', that gets the image to load, but that won't work when I need to distribute the .app .
I've been Googling for literally an hour now and I feel like an idiot because I get the feeling this is one of those things that is supposed to be brain-dead simple, but for whatever reason this time around, isn't.

Does anyone know how to include 'hello.bmp' in the .app and how to call it from the code so that it loads properly?

Share this post


Link to post
Share on other sites
Advertisement
I ended up figuring it out. By changing "hello.bmp" to "x.app/Contents/Resources/hello.bmp" (where x is the name of the app) it seems to work even if I copy the .app to the desktop and run it. Yay!
Of course, it seems obvious in hindsight..

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!