to compile cleanly on native x86_64 Linux, a small adaption (maybe conditional define) has to be made so the CP_HASH_PAIR macro defined in chipmunk.h, line 72 (I'm referring to SVN rev #192 here):
Code: Select all
#ifndef __x86_64__
#define CP_HASH_PAIR(A, B) ((unsigned int)(A)*CP_HASH_COEF ^ (unsigned int)(B)*CP_HASH_COEF)
#else
#define CP_HASH_PAIR(A, B) ((unsigned long)(A)*CP_HASH_COEF ^ (unsigned long)(B)*CP_HASH_COEF)
#endif
I also think an include guard around chipmunk.h would make sense, wouldn't it?
Why does the Makefile use the -std=gnu99 option instead of the more portable -std=c99 one? If c99 is used the only problem arising is the M_PI symbol, which can be included by writing
Code: Select all
SET(CMAKE_C_FLAGS_RELEASE "-O3 -ffast-math -std=c99 -D_XOPEN_SOURCE=500")
Greetings,
Johannes