From: s2172184@cse.unsw.edu.au ("Ben Constable")
Subject: Re: Why is cygwin.dll?
15 Jan 1997 20:52:08 -0800
Approved: cygnus.gnu-win32@cygnus.com
Distribution: cygnus
Message-ID: <970116031304.4657.cygnus.gnu-win32@cse.unsw.edu.au>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Original-To: "Jeremy Blackman" <loki@maison-otaku.net>,
        "M.Carter" <M.Carter@gcal.ac.uk>
Original-Cc: <gnu-win32@cygnus.com>
X-MSMail-Priority: Normal
X-Priority: 3
X-Mailer: Microsoft Internet Mail 4.70.1155
Original-Sender: owner-gnu-win32@cygnus.com

> Now, figure on programs like grep.exe (91,648 bytes) having to include 
> that library in their .EXE...grep is now 3 megs, instead of 91k.

No. That is totally wrong. Go compile grep or a similar program with watcom
or visual C++. You will find that they do not have to be that big. It is
because when you link the program, you only link the bits you need.
 
> Figure on that size increase for every program compiled by the gnu-win32 
> kit...INCLUDING THE KIT ITSELF (e.g. everything in the binary 
> directory).  Do the math (120+ files in the binary directory * 3 megs =
360+ 
> additional megs)... and you'll see that a substantial chunk of your hard 
> drive has just disappeared.  On top of that, add an additional 3 megs to 
> each executable YOU, as a user, compile with the gnu-win32 kit...

Again, it would only be a very small amount for each program, because only
a few functions each is only a couple of K for each program.

> I know MY hard drive can't handle that.  Besides, 1 meg is hefty enough 
> for an executable for one program I wrote...4 would be pushing the limits

> of sanity, distribution-wise.

A 4 meg executable would indicate to me that the linker does not do it's
job properly.

> Isn't it just much nicer to have one .DLL instead of statically linking 
> the entire cygwin library in? :)  It's easy enough to write an Installer 
> for Win95 or NT which installs cygwin.dll as a shared file (which is what

> I did for my program)... one copy of the file for everything that needs 
> it is much cleaner. ;)

I think the good thing about the DLL is that you can update the dll without
changing heaps of executable programs. That is the idea with most DLL's.

Ben Constable
s2172184@cse.unsw.edu.au

-
For help on using this list, send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".
