Extraneous Library Linkage

Posted by gmatt on Stack Overflow See other posts from Stack Overflow or by gmatt
Published on 2010-04-13T17:03:03Z Indexed on 2010/04/13 17:23 UTC
Read the original article Hit count: 394

I have a question which may be somewhat silly because I'm pretty sure I may know the answer already.

Suppose you have static library A, and dynamic shared object library B and your program C under linux. Suppose that library A calls functions from library B and your program calls functions from library A. Now suppose that all functions that C calls in A make no use of functions in B.

To compile C will it be enough to link just A and omit B and furthermore can your program C be run on a system without library B installed?

© Stack Overflow or respective owner

Related posts about library

Related posts about linux