[C++-sig] Reducing size of binary

Roman Yakovenko roman.yakovenko at gmail.com
Fri Jun 16 19:57:11 CEST 2006


On 6/16/06, Will Lee <lee.will at gmail.com> wrote:
> Hi,
>
> I'm currently using Boost Python in a fairly large project using Linux and
> g++.  The combined .so code that I tried to wrap is around 9MB (-O with no
> symbol).  I got to a point where the python wrapper binary gets pretty big
> (sometimes the wrapper debug .so with symbols can get to 350 MB and the -O
> version without symobls would be around 18 MB).  Compile time can get up to
> 15-20 minutes.  As far as I see, I'm not doing anything too extraordinary.
> I am using a lot of add_property and def methods in the wrapper code.
>
> Does anyone have hints on reducing the size of the wrapper binary?

It could be useful to know your g++ version and compilation line.
Meanwhile you can
read this: http://www.nedprod.com/programs/gccvisibility.html

-- 
Roman Yakovenko
C++ Python language binding
http://www.language-binding.net/



More information about the Cplusplus-sig mailing list