Hi. I added today that unit I was talking about a week before, to an existing project. I just added the unit to the uses clause and nothing more! I did not used any of its procedures or functions. The size of the exe file jumped from 409600 to 542800 bytes. The size of the compiled unit is 100KB.
What it is wrong? The size of my EXE should not increase since I used no functions/procedures from that unit. The header of that unit is something like: UNIT MyTpu; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, Registry, ShellApi, mmSystem, ComObj, JPEG, DateUtils, IniFiles, FileCtrl, ShlObj, ActiveX, SHFolder, ClipBrd, ImageHlp, WinSock, FastStrings, UnitEmailVerifier, CubTPU_ext; const ... Gabriel CubicDesign wrote: > > I made today a very simple program to test a new VCL. The size of the > exe looked ok. > > Then I added in the 'uses' clause a unit I created and which contains > very useful routines that I created/collected over the years. This > unit (DCU file) is 104Kb. > After recompiling, the size of the exe was bigger with 106Kb. It looks > like it added the whole DCU in the exe while I knew that only the used > code would be integrated in exe. > > I will try to reproduce today this 'experiment' with different DCUs. > > > Gabriel > > Rob Kennedy wrote: >> CubicDesign wrote: >> >>> I have a question about the size of the EXE file made by Delphi compiler. >>> I thought that Delphi put in the exe ONLY the used procedures/functions >>> from a unit/DCU. >>> >> >> That's correct. What have you found in your EXE that you (pretending to >> be the compiler) can prove will never be called? >> >> __________________________________________________ Delphi-Talk mailing list -> Delphi-Talk@elists.org http://www.elists.org/mailman/listinfo/delphi-talk