[ODE] Wrong brackets in definition of dSqrt in common.h ?
Peter Onion
Peter.Onion at btinternet.com
Tue Dec 13 14:55:06 MST 2005
I have not got to the bottom of this yet but.....
I'm just building some existing working ODE code on my new AMD 64 box
and I got this error from gcc.....
Drawers2.c: In function ‘timeout’:
Drawers2.c:232: error: syntax error before ‘float’
line 232:
distance = dDISTANCE(posn3,force3);
I think the problem is coming from the declaration of dSqrt used in
dDistance.
dSqrt in defined in common.h as
#define dSqrt(x) ((float)sqrtf(float(x)))
which looks odd as I don't think there is not function called "float".
I think it should be
#define dSqrt(x) ((float)sqrtf((float)(x)))
which atleast compiles in the 64 bit box.
I'm not sure why it ever compiled in the original form!
The gcc on this box is
gcc version 4.0.2 20050901 (prerelease) (SUSE Linux)
Peter
More information about the ODE
mailing list