I was thinking at the same thing. My DCU/TPU does not have a initialization section but I know that some of those 'shell' units I use, does have one. For example ComObj does some initialization. I think there is the problem.
I compiled my exe with and without that DCU, using the MAP option and then I compared the MAP files. They were very difficult to compare (even if I used a special program) because they are very different and I didn't got any conclusion. Anyway I started to break the unit in smaller units to find out who is responsible. Michael Grimard wrote: > Does your unit have an initialization section? > > I think the code in an initialization section and all the functions/classes > it needs to run will be compiled in your EXE even without using any variable > declare in the initialization section. > > > Michael > > CubicDesign wrote: > > >> 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 >> > > _________________________________________________________________ > This March Break, Have An Outdoor Fun-For-All! > http://local.live.com/?mkt=en-ca/?v=2&cid=A6D6BDB4586E357F!147 > > __________________________________________________ > Delphi-Talk mailing list -> Delphi-Talk@elists.org > http://www.elists.org/mailman/listinfo/delphi-talk > > __________________________________________________ Delphi-Talk mailing list -> Delphi-Talk@elists.org http://www.elists.org/mailman/listinfo/delphi-talk