[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] GCC question



Am 15.11.2010, 19:32 Uhr, schrieb Peter Slegg <p.slegg@scubadivers.co.uk>:

Can someone enlighten me ?

#define TREE_XYWH(tree) tree[0].ob_x-3,tree[0].ob_y-3,tree[0].ob_width+6,tree[0].ob_height+6
.
.
objc_draw(dlog, start, MAX_DEPTH, TREE_XYWH(dlog));

I thought that the macro above would be inserted into the second line
before it was compiled but I am getting this error.

newsaes.c:651:52: error: macro "objc_draw" requires 7 arguments, but only 4 given

True. TREE_XYWH should be expanded first. gcc -E might tell more. Maybe you are missing a \, or put the def in one line:

#define TREE_XYWH(tree) tree[0].ob_x-3,tree[0].ob_y-3,tree[0].ob_width+6,tree[0].ob_height+6

--
Helmut Karlowski