I have an app, call it Animal.app
. Inside its Contents/Frameworks
folder is a framework, say Mammal.framework
. And inside the Versions/A/Frameworks
folder of the framework, I have dog.dylib
. The install name of dog.dylib
is @rpath/dog.dylib. For the "Runpath Search Paths"
setting of the framework, I have specified @loader_path/../Frameworks
. (My reasoning for that last setting is that the "loader" of the dylib would be the binary of the framework, at the path Mammal.framework/Versions/A/Mammal
.)
I get an error message at runtime:
Dyld Error Message:
Library not loaded: @rpath/dog.dylib
Referenced from: /Volumes/VOLUME/*/Animal.app/Contents/MacOS/../Frameworks/Mammal.framework/Versions/A/Mammal
Reason: image not found
I've read Apple's "Run-Path Dependent Libraries" documentation, and Mike Ash's blog post on @rpath
, but I still can't see what I'm doing wrong.
@executable_path
just as well, but@loader_path
seems cooler :-) – Strander