delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1998/09/24/00:30:52

From: michael AT weiser DOT saale-net DOT de (Michael Weiser)
Subject: Re: g++ executables / bash window
24 Sep 1998 00:30:52 -0700 :
Message-ID: <360998e3.1467450.cygnus.gnu-win32@mail.weiser.saale-net.de>
References: <3606BD64 DOT 79CA AT lucky DOT fr>
Mime-Version: 1.0
To: Romain Behar <rbehar AT lucky DOT fr>
Cc: gnu-win32 AT cygnus DOT com

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 AT cygnus DOT com" with one line of text: "help".

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019