Hi all,
So I've been fiddling with this for quite a while now, but alas my linking experience is a little lacking.
With a simple SDL2-based application written in Nim, using the SDL2 library here: https://github.com/nim-lang/sdl2 I've been attempting to compile it such that the SDL2.framework is passed in relatively in OSX.
I can compile it no problem when SDL2 is installed in my operating system through homebrew, but that doesn't help me when distributing it unfortunately. Is there a way to dynamically link a framework via a relative path? Using install_name_tool I can set @rpath to be @executable_path which then coupled with the pragma here: http://hastebin.com/uzivetoteh.nim gives me an error at runtime about not being able to find libSDL2.dylib
I'm somewhat at a loss, and am kind of out of my depth here!
Cheers, Josh
You need to create an .app which is actually just a directory with a special structure that contains your lib*.dylib dependencies. The internet knows the details.
<rant>Gosh, how much I love these retarted lib prefixes everywhere... And then they dare to make fun of Hungarian notation... Why is it that Unix cannot follow DOS into the dustbin of history?</rant>