[fpc-devel]Re: Unit not used ?

Peter Vreman peter at freepascal.org
Sun Jun 8 10:17:18 CEST 2003


At 08:11 8-6-2003, you wrote:
> > > unit_one.pp(119,13) Hint: Unit UNIT_TWO not used in UNIT_ONE
> > > Even though THE UNIT ACTUALLY IS USED.
>
>
> > Normally, this means that even though you put "uses unit_two" in unit
> > one, you're not using any procedure, type or global variable from
> > unit_two in unit_one and unit_two also doesn't have an initialization
> > section. So you can just remove the "uses unit_two;" from unit_one and
> > unit_one should still compile and work correctly.
>
>
>Thanks for your response, Jonas -
>
>There are things in UNIT_TWO on which UNIT_ONE depends.
>Removing "uses unit_two;" results in a compiler error:
>
>   Undeclared identifier 'SOMETHING'
>
>That "SOMETHING" is declared in UNIT_TWO
>
>But putting an empty initialization section in UNIT_TWO
>eliminates the message.
>
>I will try to see if I can come up with a simple example to
>reproduce the problem, but the project is about 3800 lines,
>spread across twelve different units, so it is a bit too
>large to post it here...

Can you try it with the 1.1 compiler, because this will not be fixed 
anymore in the 1.0.x series.


Peter





More information about the fpc-devel mailing list