My .app packages looks like this:
MyApp.app/
Contents/
MacOS/
MyApp
libA.dylib
libB.dylib
libC.dylib
PlugIns/
PlugIn1.bundle/
...bundle contents
PlugIn2.bundle/
...bundle contents
Both PlugIn1.bundle and PlugIn2.bundle are linked against libA.dylib, libB.dylib, and libC.dylib. The three dylibs have install names of @loader_path/libName.dylib. The bundles, however, cannot find libA.dylib, libB.dylib, or libC.dylib. I've tried setting the -bundle_loader flag to link against the main executable, but that didn't help. Is it possible for the bundles to look up the dylibs from the MacOS folder of the .app package and not have to copy them into the bundle as well?