Board index » delphi » How do i minimize DLL or EXE size..??

How do i minimize DLL or EXE size..??

Hi

I'm looking for a way to minimize the size of my DLL or EXE.

Once I've compiled even a simple form DLL in Delphi, you're up to 180
KB. I don't want to link all the VCL code that won't be used anyway!

Thanks.

 

Re:How do i minimize DLL or EXE size..??


Quote
> I'm looking for a way to minimize the size of my DLL or EXE.

> Once I've compiled even a simple form DLL in Delphi, you're up to 180
> KB. I don't want to link all the VCL code that won't be used anyway!

Delphi 2 will remove any unused code if optimisation is turned on.
Unfortunately,  the forms unit incurs quite a large footprint and will
result in a large DLL size even with optimization. I try to place non
visual code into DLL's for this very reason.

Re:How do i minimize DLL or EXE size..??


On Tue, 01 Apr 1997 20:40:46 +0200, Erik Roijackers <er...@xs4all.nl>
wrote:

Quote
>Hi

>I'm looking for a way to minimize the size of my DLL or EXE.

>Once I've compiled even a simple form DLL in Delphi, you're up to 180
>KB. I don't want to link all the VCL code that won't be used anyway!

>Thanks.

A good way to minimize code... especially useable in DLL's is not to
use VCL's but use the Windows API...
Minimize code size significantly.
-------------------------------------------------------------------------
Greetings from Leif Bredgaard Andersen
mailto:lband...@post2.tele.dk
ICQ uin: 131319
URL : http://home2.inet.tele.dk/lbanders
"Anything that can go wrong will go wrong
- especially with your PC" - Murphy

Re:How do i minimize DLL or EXE size..??


Quote
Erik Roijackers wrote:

> I'm looking for a way to minimize the size of my DLL or EXE.

  On both, try optimizing the code....  However....

Quote
> Once I've compiled even a simple form DLL in Delphi, you're up to 180
> KB. I don't want to link all the VCL code that won't be used anyway!

  180k with the FORMS unit in it, is pretty good...  And that's about as
small as it gets, UNLESS you do everything through the Windows API (such
as creating the forms at run-time etc...)
  Basically, the more 'units' you have in your Uses clause, the bigger
the program/DLL will be....

--
Jason
Dark...@SLSoftware.reno.nv.us

Re:How do i minimize DLL or EXE size..??


Quote
Erik Roijackers wrote:

> Hi

> I'm looking for a way to minimize the size of my DLL or EXE.

> Once I've compiled even a simple form DLL in Delphi, you're up to 180
> KB. I don't want to link all the VCL code that won't be used anyway!

> Thanks.

1) make sure that you have debugging info turned off (180k isn't bad)

2) wait for Delphi 3.0 and its packages which will let you control what
goes in your exe.

HTH

--

Robert Schieck
-----------------------------------------------------------------------
MER Systems Inc.   voice - 416-410-5166
                  fax    - 416-410-5167

Client/Server Development and Training using Delphi,  InterBase and
Oracle

home page            http://www.mers.com
InterBase page  http://www.mers.com/interbase.html
udflib page     http://www.mers.com/product.html
TDUG page       http://www.mers.com/tdug.html      -Toronto Delphi Users Group

Re:How do i minimize DLL or EXE size..??


Quote
Erik Roijackers wrote:

> Hi

> I'm looking for a way to minimize the size of my DLL or EXE.

> Once I've compiled even a simple form DLL in Delphi, you're up to 180
> KB. I don't want to link all the VCL code that won't be used anyway!

> Thanks.

Hi!
Try to use Windows API calls instead of RAD VCL. This is not so
comfortable, but saves EXE size. You even may completly leave
visual design aside and write pure Object Pascal code.
The minimum size of simple EXE file I did in this way is about 10 Kb.

PS Sorry for bad english
                                                George Filyaghin

Re:How do i minimize DLL or EXE size..??


i
There is a nice book: "Delphi 2 UNLEASHED" by Charles Calvert.
See the chapter 9.

Hope it helps.

Peter A. Andreev
pe...@r1.vor.inkom.ru

Other Threads