I am running into the following situation. Project A has libraries A1, A2, A3... That follow their own directory structure. For example:
Libaries/
|
|--Dir1/
| |
| |--A1.so
| |--A2.so
|
|--Dir2/
| |--A3.so
| |--A4.so
In this case Project A compiles just fine. The libraries of project A are dependencies for project B and a script (that I have no control over) copies them onto B's directory in a flat hierarchy i.e this
BLibraries/
|--A1.so
|--A2.so
|--A3.so
|--A4.so
So the relative paths are no longer the same.
B loads symbols from these libraries dynamically through dlopen. In this case, If A1 needs symbols from A2, B they appear as undefined and so B fails to load A1.
Is there a way I can poke the files Ai.so and tell them "Hey that other library whose symbols you need is actually over here now"?