[SDL] MacOSX app bundle
Ryan C. Gordon
icculus at clutteredmind.org
Wed Dec 3 06:35:31 PST 2003
> I'm able to build and run my project with a makefile largely similar to
> the unix one, I've added a few directives to build the XXX.app directory
> and place the executable there but the problem I have is with libraries,
> the executable always search for the dylib with an ABSOLUTE path (eg
> /usr/local/lib/libSDL.dylib), how can I tell linker to search for
> libraries installed in a directory inside the app bundle?
My favorite hack is to build SDL from source, but manually link it.
Add/replace the -install_name linker command with:
Link your program against that library. It will look for it in the same
directory as the binary at runtime (so copy it into
XXX.app/Contents/MacOS with your binary).
This isn't really "the Mac way", but it's much more comfortable and
obvious to my Linux background.
More information about the SDL