How can I compile this?

Dawid Ciężarkiewicz dawid.ciezarkiewicz at gmail.com
Sun Oct 15 09:04:53 PDT 2006


Bradley Smith 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.
> 
> How about moving the enum Direction above the imports? Like the
> following snippet:
> 
> ...
> module map;
> 
> enum Direction {
> UP,
> DOWN,
> UP_LEFT,
> UP_RIGHT,
> DOWN_LEFT,
> DOWN_RIGHT
> }
> 
> import player;
> ...
> 
> For me, this compiles, but then gives link errors.

That is funny and interesting solution. I'll try it. :)

Maybe I'll just put all my imports at the end of files. :D



More information about the Digitalmars-d-learn mailing list