I have an executable A which dynamically loads B.so, which in turn depends on C.so. C.so is not in the same folder as A and B.
I am trying to load B.so using QLibrary.load() but fail to do so as QLibrary.errorString() returns library C.so could not be loaded.
The QLibrary documentation says that LD_LIBRARY_PATH can be used, but I'd prefer not to do this. I'm using -Wl,-rpath,/path/to/C/ when linking B.so, but it doesn't help for the dynamic loading.
Any suggestions on how I can load B.so without resorting to LD_LIBRARY_PATH? Can I make it work with -rpath?