[C++-sig] Size difference between .so and .dll files
s_sourceforge at nedprod.com
Wed Jun 16 03:04:32 CEST 2004
-----BEGIN PGP SIGNED MESSAGE-----
On 15 Jun 2004 at 10:28, Christophe Grimault wrote:
> We have 2 versions of the same software. One on linux RH9, and one
> Win XP. Both of them compile and work fine. They use several C++ files
> compiled with boost to interact with Python. On windows, a dll with a
> size of a few hundreds of ko. On linux, the size for the equivalent
> .so is a few Mo.
> Have we missed something ? Any hints to reduce this size, if possible,
> are welcome !
1. Use GCC 3.4. This should knock 50% off your binary.
2. Patch GCC with my patch at
http://www.nedprod.com/programs/gccvisibility.html. With -
fvisibility=hidden this should knock a further few hundred Kb off
your binary and produce better quality code too.
No matter what you do, the Linux binary will be at least 20% larger
than your MSVC binary.
-----BEGIN PGP SIGNATURE-----
Version: idw's PGP-Frontend 18.104.22.168 / 9-2003 + PGP 8.0.2
-----END PGP SIGNATURE-----
More information about the Cplusplus-sig