Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2006-03-29 15:40:14


Marshall Clow <marshall_at_[hidden]> writes:

> At 5:13 PM +0200 3/29/06, Olaf van der Spek wrote:
>>On 3/29/06, Ulrich Eckhardt <doomster_at_[hidden]> wrote:
>>> different compiler versions or settings and it reduces the additional
>>> required size of the final executable (example-prog[1] with above static
>>> linking weighs 52kB, the thread lib alone would have been 92kB already
>>> otherwise).
>>
>>Doesn't the linker include only those parts of a (static) lib that are
>>actually used?
>
> Depends on the linker.
> Dumb linkers include everything - because it is simpler.

For G++ to do that you might need to compile with -ffunction-sections

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk