[ODE] Slight patch for Mac OS X.3
Shamyl Zakariya
zakariya at earthlink.net
Thu Apr 22 16:03:56 MST 2004
To whomever takes patches:
Mac OS X 10.3 *finally* introduced single precision trig functions, and
as such the apple-specific #defines in Opcode.h cause linker errors.
I changed it from:
#if defined(__APPLE__) || defined(__MACOSX__)
#define sqrtf sqrt
#define sinf sin
#define cosf cos
#define acosf acos
#define asinf sinf
#endif
to:
#if defined(__APPLE__) || defined(__MACOSX__)
#if __APPLE_CC__ < 1495
#define sqrtf sqrt
#define sinf sin
#define cosf cos
#define acosf acos
#define asinf sinf
#endif
#endif
This way it builds happily on 10.2 and before, but will use
single-precision on 10.3. Well, at least at build-time. I'm not certain
about run-time. Right now, this is the only change I need to make to
get ode-lib & opcode built happily. I use my own graphics system so I
don't build drawstuff or any of the tests.
Also, one more thing. I don't want to suggest a patch here since I
don't know how this affects other GNU type systems, but at least on Mac
OS X, the opcode static library ( libopcode.a ) must have ranlib run on
it before it can be linked into an executable. It would be easy to add
that to the makefile, but I know Mac OS X has some oddities regarding
binary formats compared to ELF systems like linux.
Shamyl Zakariya
"this is, after all, one of those movies where people spend a great
deal of time looking at things and pointing."
From a review of _Fantastic Voyage_
More information about the ODE
mailing list