"how to distribute a mac os x with dependent libraries?" Code Answer

4

as you mentioned you're not using xcode, so it's a bit difficult. here are options in my order of preference:

  1. switch to xcode. use frameworks. the sdl libraries are available as frameworks already, and i've seen more than a couple commercial games with a libsdl.framework inside the app bundle.

  2. use frameworks, but keep your makefiles. download the framework versions of your sdl libraries (or build them yourself), and link with them with the -framework linker flag. distribute the frameworks with your app or don't, and tell your users to put them in either ~/library/frameworks or in /library/frameworks. i wouldn't bother with an installer for this.

  3. statically link against sdl. in the makefile, you'll have to list the path of the static libraries rather than use the -l flag, e.g., you run "ld blah blah /opt/local/lib/libsdl.a". there is no way that i know to tell -l to prefer static over shared libraries, and believe me, i've looked.

By Jorge M. Nures on January 15 2022

Answers related to “how to distribute a mac os x with dependent libraries?”

Only authorized users can answer the Search term. Please sign in first, or register a free account.