Interdependent modules?

Derek Parnell derek at nomail.afraid.org
Mon Jun 19 22:21:03 PDT 2006


On Mon, 19 Jun 2006 21:12:10 -0700, kris wrote:

> Carlos Santander wrote:
>> Jeremy Gibson <jtgibson telus net> escribió:
>>> Naturally, the compiler doesn't like this kind of cross-dependency of 
>>> modules.
>>> However, being a total newbie doesn't help me find an answer, so I 
>>> thought I'd
>>> resort to the experts.
>>>
>> 
>> The only reason why the compiler shouldn't accept it is if you have 
>> module ctors or static class ctors in both modules. You should try to 
>> remove them from one of the modules.
> 
> Note that the -cov option will generate static-ctors, so you have to be 
> aware of that with respect to cyclical imports :)

Just throwing out an idea here, but if two modules are dependant on each
other, why not combine them into a single module?

-- 
Derek
(skype: derek.j.parnell)
Melbourne, Australia
"Down with mediocrity!"
20/06/2006 3:20:09 PM



More information about the Digitalmars-d-learn mailing list