Jiaoma / chipmunk-physics

Automatically exported from code.google.com/p/chipmunk-physics
MIT License
0 stars 0 forks source link

NULL not defined in cpBody.h #18

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Chipmunk fails to compile after the components merge, since cpBody.h references 
NULL, but doesn't include any of the files that usually define it. Throwing a 
quick:

#ifndef NULL
#define NULL ((void *)0)
#endif

at the top of the file fixes the issue.

Original issue reported on code.google.com by raydo...@gmail.com on 29 Jul 2010 at 11:49

GoogleCodeExporter commented 8 years ago
I replaced the NULL's with ((cpBody *)0), etc. Not sure if different compilers 
would complain about comparision to void * as VC++ doesn't allow implicit casts 
from void *.

Original comment by slemb...@gmail.com on 30 Jul 2010 at 1:21