I have developed a shared library B.so, which depends on A.so. When I write a program test.exe using B.so, but there is a compile error, it said that some symbols(the symbols are in A.so) not found. My build line:
gcc test.c -o test.exe -fPIC -I./ -L./ -lB
Do we have a method that, how to build test.exe successfully,but not link A.so.
A
as well?ld
had a different behavior in this kind of situation, it did link toA.so
automatically. But it does not do it anymore.