I’m compiling 2 shared libraries (“A”, “B”) under Linux (Ubuntu 11)
The lib “B” is using exported function from lib “A” (linked statically with -lA)
But when I’m running ldd on “B” I just have*
linux-gate.so.1 => (0x004c0000) libc.so.6
/lib/i386-linux-gnu/libc.so.6 (0x00abf000)
/lib/ld-linux.so.2 (0x00679000)
I cannot see my “A” dependency !?
Strange, I was (almost) pretty sure ldd used to display ALL static dependencies !?
You need to link dynamically
libA.sointolibB.so, that is to buildlibB.sowith something like(assuming no
libA.aexist, only alibA.so)And then you could use
ldd libB.soto check that it does linklibA.soLook for example into most GUI libraries like
/usr/lib/libQtGui.so.4or/usr/lib/libgtk-3.so, e.g.