How can I compile this?

Tom S h3r3tic at remove.mat.uni.torun.pl
Sat Oct 14 10:12:58 PDT 2006


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! ;)



More information about the Digitalmars-d-learn mailing list