Boost logo

Boost Users :

Subject: [Boost-users] Surprised by size of static libraries
From: David Aldrich (David.Aldrich_at_[hidden])
Date: 2010-07-30 06:59:48


I have built static and shared boost_python libraries under Visual C++ 2008 under Windows and am surprised by the size difference. The commands I use are:

C:\boost_1_43_0>bjam toolset=msvc-9.0 --with-python link=shared
C:\boost_1_43_0>bjam toolset=msvc-9.0 --with-python link=static

The resulting shared libraries are:

boost_python-vc90-mt-1_43.dll 216KB
boost_python-vc90-mt-gd-1_43.dll 500KB

The resulting static libraries are:

libboost_python-vc90-mt-1_43.lib 5.59MB
libboost_python-vc90-mt-gd-1_43.lib 21.2MB

Please can anyone explain why the static libraries are at least 25x larger than the shared libraries?

Is there a way to reduce the size of the static libraries?

Best regards


Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at