Wow, man dlopen says this isn't a bug!
When path contains a slash but is not a framework path (i.e. a full path or a partial path to a dylib), dlopen() searches the following until it finds a compatible Mach-O file: $DYLD_LIBRARY_PATH (with leaf name from path ), then the supplied path (using current working directory for relative paths), then $DYLD_FALLBACK_LIBRARY_PATH (with leaf name from path ).
This seems crazy to me, but at least now I can figure out how to solve the problem.
Topic:
Developer Tools & Services
SubTopic:
Xcode
Tags: