[Lazarus] Fatal: Circular unit reference between units

michael.vancanneyt at wisa.be michael.vancanneyt at wisa.be
Wed Nov 21 14:45:16 CET 2012



On Wed, 21 Nov 2012, Eric Kom wrote:

> Good day all,
>
> Please I got a problem regarding units. To use components from unit1 called 
> mainWindow, I included the header unit1 inside unit2 called loginScholarly. 
> During build process, the above message occurred:
>
> loginscholarly.pas(19,42) Fatal: Circular unit reference between 
> loginScholarly and mainWindow

Well, you're not supposed to do this. Probably mainWindow already uses loginScholarly.

In general, units should not use each other, it is bad design.

Now, you can solve this by moving one of the units from the interface uses section
to the implementation section. You'll have to decide which one.

In general, however, it is better to move common parts to a separate unit,
and let both units use that third unit.

Michael.

>
> Thanks
>
> -- 
> Kind Regards
>
> Eric Kom
>
> System Administrator - Metropolitan College
> _________________________________________
> / You are scrupulously honest, frank, and \
> | straightforward. Therefore you have few |
> \ friends.                                /
> -----------------------------------------
>   \
>    \
>        .--.
>       |o_o |
>       |:_/ |
>      //   \ \
>     (| Kom | )
>    /'\_   _/`\
>    \___)=(___/
>
> 2 Hennie Van Till, White River, 1240
> Tel: 013 750 2255 | Fax: 013 750 0105 | Cell: 078 879 1334
> erickom at kom.za.net | erickom at metropolitancollege.co.za
> www.kom.za.net | www.kom.za.org | www.erickom.co.za
>
> Key fingerprint: 513E E91A C243 3020 8735 09BB 2DBC 5AD7 A9DA 1EF5
>
>
> --
> _______________________________________________
> Lazarus mailing list
> Lazarus at lists.lazarus.freepascal.org
> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
>




More information about the Lazarus mailing list