
29 Mar
2006
29 Mar
'06
8:40 p.m.
Marshall Clow <marshall@idio.com> writes:
At 5:13 PM +0200 3/29/06, Olaf van der Spek wrote:
On 3/29/06, Ulrich Eckhardt <doomster@knuut.de> 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