This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: g++ executables / bash window


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".


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]