g++ executables / bash window

Michael Weiser michael@weiser.saale-net.de
Wed Sep 23 18:18:00 GMT 1998

Hello Romain, you wrote:
>I've been using FreeBSD, then installed GNU-Win32B19 on NT4.
>I noticed that g++ executables are very big when compiled with
>GNU-Win32, that is 330Kb for a simple `cout << "Hello world!";' while
>the C version is less than 20Kb.
>Under FreeBSD which runs GNU g++ too, there is no such a differnce.
On FreeBSD like any other OS your program will be linked dynamically
with all needed libraries (libg++.a ?). So the additional 310KB are
somewhere in your system and loaded and linked at program startup but
they're not in the executable itself. On cygwin32 there is no such
dynamic loader/linker for UN*X-like libraries. So all needed libraries
get linked statically with every executable which of course makes them
pretty fat.

One approach in reducing that size would be to write DLLs as
replacements for the UN*X-like lib*.a libs. But AFAIK that needs some
volunteers. :-/
man liest sich, Micha
Ich bin gegen Hueftknochen!
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".

More information about the Cygwin mailing list