Galcon Games
Phil Hassey - game dev blog
Phil Hassey as Wolverine
"What kind of
arrogant jerk
has a website like this?"

Bundling SDL_image.framework and SDL_mixer.framework

So if you are trying to build a SDL + SDL_mixer + SDL_image + OS/X + Xcode game .. well .. when you build it using the SDL Application Templates, you’ll find that it includes the SDL.framework in the application bundle but it does NOT include the SDL_image.framework and SDL_mixer.framework in the bundle.

Which means, it will work on your computer if you’ve installed the SDL_image and SDL_mixer frameworks in /Library/Frameworks .. but it won’t work on any computer that does not have those frameworks installed.

The error they will see if they happen to run your app from the command line will look something like:

 

dyld: Library not loaded: @executable_path/../Frameworks/SDL_image.framework/Versions/A/SDL_image

  Referenced from: /Users/phil/tmp/ibeast_osx.app/Contents/MacOS/ibeast_osx

  Reason: image not found

This blog has some instructions on how to deal with this.  However I still found it confusing that I had no idea where these “New Copy Files” rules were being placed.  Especially since I knew the SDL template had one already and I wanted to just modify that rule, or duplicate it.
Here’s where to find those rules from your SDL template project:
Groups & Files > Targets > (name of your project) > Copy Frameworks into .app bundle >
And you can drag your SDL_mixer and SDL_image frameworks onto that list.

Comments are closed.


Galcon   Watermelons   Dynamite   The Hairy Chestival
All content of imitation pickles (c) 1999-2008 - Phil Hassey  "we care"