October 14, 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.

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.

  Bradley
October 15, 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
1 2
Next ›   Last »