[Lazarus] Fatal: Circular unit reference between units

Eric Kom erickom at metropolitancollege.co.za
Wed Nov 21 16:59:59 CET 2012


On 21/11/2012 15:45, michael.vancanneyt at wisa.be wrote:
>
>
> 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.
Thanks, it works. I butter use implementation section since it will give 
me hard work by creating another unit file at the moment.

I will think about that in the next project
>
> 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
>>
>
> -- 
> _______________________________________________
> Lazarus mailing list
> Lazarus at lists.lazarus.freepascal.org
> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
>


-- 
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





More information about the Lazarus mailing list