Program use two conflicting shared libraries
问题 I have a shared library A.so . There is a function foo() defined in it. This foo() function depends on a shared library libnl-1.so . The relationship is below: A.so { foo() => libnl-1 } I have a program app . It calls two functions, foo() and bar() . bar() needs another version of libnl, libnl-3. The relationship is below: app { foo() bar() => libnl-3 } I compiled app using cc -o app -lnl-3 -lA . But I found my app always crashes. It seems that foo() is calling into libnl-3 instead of libnl-1