Subject Re: [IBO] How find where a program uses unnecessary BDE units?
Author Artur Anjos
Hi Marco,

You right about this. In Delphi 5 (don't know about Delphi 6) if you declare
a file in the uses clause, Delphi actually link it to the exe file, even if
you do not use it.

It's hard to find it. There's no automatic way to do it. You must delete it
manually from the uses clause and try it. Argh. I found some utilities to do
this using google sometime ago. I really test one or two, but I didn't like
them and I did it manually.

But I think that the DB file that you are talking about it's not BDE
related: it's there to use the TDataset descendants. But I'm not sure about

Just my 2 cts


----- Original Message -----
From: "mmenaz" <mmenaz@...>
To: <>
Sent: Wednesday, May 15, 2002 10:37 AM
Subject: Re: [IBO] How find where a program uses unnecessary BDE units?

Ok, so I turn the question this way:
a) how can I be sure that the code does not use BDE stuff?
b) if it uses it (I mean, if somewhere it's USED, not in the uses clause on=
ly), who can I discover where (in what unit?)?
You know, A.pas could "uses" B.pas that "uses" C.pas that uses BDE stuff an=
d links it to the whole exe.
Marco Menardi

--- In IBObjects@y..., Svein Erling Tysvær <svein.erling.tysvaer@k...> wrot=
> >Hi, it's a little of topic, but I need IBO experts ;)
> Or Delphi experts? Well, I'm neither, but I'll still answer.
> >Recently I fixed FastReport code and removed a "uses DB" that was wrongl=
> >also in the IBO conditional compilation stuff.
> >I thought that after that fix my program would have been reduced in size=
, but
> >was not true, so I think that some other unit, somewhere, is "using"
> >unnecessary BDE units.
> Were any db components used in the code, or just the declaration "uses DB=
> I took one project I have, added one component that I knew I didn't use (=
> fact, it was one of the many components I've never used), compiled (which=

> added four units to my uses clause) and the .exe size grew. Then I delete=
> the component leaving the uses clause unchanged, and the .exe size shrink=

> to the same size as it originally were + 1kb (that tells me is that the
> four added elements in the uses clause increased my .exe by between 1 and=

> 1999 bytes). So, my conclusion is that including something in the uses
> clause only marginally affects size, you have to actually use the compone=
> for it to be of any importance.
> Set