How can I compile this?

Dawid Ciężarkiewicz dawid.ciezarkiewicz at
Sat Oct 14 10:50:51 PDT 2006

Tom S wrote:

> Dawid Ciężarkiewicz wrote:
>> $ make
>> bud rdwars \
>>                 -w -op -debug -gc \
>>                 -od.obj \
>>                 -Xstd \
>>                 -L-ldl
>> map.d(43): enum Direction is forward referenced
>> make: *** [rdwars] Error 1
>> PLEASE. I just can't go through ...
>> Only dmd/phobos + bud should be needed.
> I fixed it by putting Direction in its own module, 'direction' and
> importing where necessary. This essentially moves the Direction enum out
> of an import cycle, which seems to be the root of the problem.
> Actually, cyclic imports can cause many sorts of problems and it's
> generally wise to avoid them altogether
> Powodzenia! ;)

Well this sucks. How can you people write real programs? If'd be forced to
put every enum in it's own file I'll end up with mess and no hair on my

I'll do as you told me. But I will not start any new project in D. I'll wait
until D is ready. What is the point of having fancy features where simple
things are messed up. :/

Dzięki. :) Dalej powinno być z górki ... - oby.

More information about the Digitalmars-d-learn mailing list