dependency list for static libraries

Howard Chu hyc@symas.com
Tue Sep 19 16:04:00 GMT 2017


Simon Richter wrote:
> Hi,
> 
> On 19.09.2017 17:49, Howard Chu wrote:
> 
>> We often get link errors when switching from dynamic linking to static
>> linking, because dynamic libraries list all of their own dependency
>> libraries, and static libraries don't. (And the program being linked
>> doesn't know about those indirect dependencies.)
> 
> That is what libtool's .la files do — these have a list of extra
> dependencies to be linked when linking statically.

Libtool files are a poor solution and an additional admin overhead. Not every 
project uses libtool. Indeed, we only use it when we're creating shared 
libraries; for a project that only uses static archives nobody bothers with 
it. This functionality rightfully belongs in the linker itself.

-- 
   -- Howard Chu
   CTO, Symas Corp.           http://www.symas.com
   Director, Highland Sun     http://highlandsun.com/hyc/
   Chief Architect, OpenLDAP  http://www.openldap.org/project/



More information about the Binutils mailing list