How can I compile this?

Bradley Smith digitalmars-com at baysmith.com
Sat Oct 14 16:54:53 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.

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



More information about the Digitalmars-d-learn mailing list