This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Resolving symbols in dependent libraries


Hi,

Say I have two shared libraries, a.so and b.so.  a.so depends on b.so
and links it in when it is built.  Say that b.so contains the symbol
B.  In my program I call B() directly.

I'd like to be able to link my program by just referring to a.so, and
have it know to look in b.so to resolve B():

g++ foo.cpp -l a

Right now it seems I have to do:

g++ foo.cpp -l a -l b

in order to get B() resolved.  Is there a way to do this.  Am I doing
something wrong so that the dependent library isn't searched
automatically?

Thanks,

-- 
Andrew Bell
andrew.bell.ia@gmail.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]