I have software that first loads .dylib, allows you to call libFirst.dylib using the following command:
void* handle = dlopen(path.c_str(), RTLD_LAZY | RTLD_GLOBAL);
Later inside the function from the loaded libFirst.dylib I try to load another .dylib using the same command, but for libSecond.dylib loading this shared library gives me the following warnings in my Xcode console:
error warning: Ignored unknown object module at 0x129310 with type 0x8a8399 dlerror: dlopen(/path/libSecond.dylib, 9): Library not loaded: libFirst.dylib Referenced from: /path/libSecond.dylib Reason: image not found
I do not understand that its libFirst.dylib is not loaded, but I am currently included in a function from libFirst.dylib, so how can this be?
All my paths in DYLD_LIBRARY_PATH also display correctly.
Thanks in advance, I am stuck on this for several days.
source share