[fpc-devel]Re [2]: Some more compiler problems
Peter Vreman
peter at freepascal.org
Wed Apr 4 09:57:07 CEST 2001
> Hello,
>
> > The only thing how you can control is by placing the unit that must be initialized
before
> > the current unit in the interface uses line.
>
> The main thing is that not all units declare unit usage in the
> interface part. Sometimes it is not possible because of interdependency.
That's the problem in your project not from the compiler. You need to rethink your module
structure in your project to solve this or think about an different initialization using
InitModule and DoneModule procedures and calling those yourselves.
>
> Maybe it is possible to build some "clever" dependency tree?
Go ahead if you know how to do it, the main parts of the code are located in pmodules.pas
and fmodule.pas. But don't forget the whole unit loading situation is very complex and
dangers of recursion.
More information about the fpc-devel
mailing list