Reducing library dependancies

Thiago Macieira thiago at
Fri Aug 1 15:31:36 BST 2008

On Friday 01 August 2008 15:40:10 John Tapsell wrote:
> Hi all,
>   I have found that the more libraries a program links against, the
> slower the start up time.  This is obvious, but it was surprising just
> how big this effect can be.
>   It would be good to go through all the kde apps and make sure we
> don't link against unnecesary libraries anywhere.
>   Does anyone know how to get a list of libraries that a program links
> against but doesn't actually use?  I've been playing about with  'ldd
> -u'  to list 'unused direct dependancies' but this doesn't seem to
> produce sensible answers at all.  (For example it's telling me that
> ksysguard doesn't need to link against any Qt or KDE programs!)

You could just use the linker flag --as-needed.

  Thiago Macieira  -  thiago (AT) - thiago (AT)
    PGP/GPG: 0x6EF45358; fingerprint:
    E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <>

More information about the kde-core-devel mailing list