I'm trying to compile a small code with CP stuff but I get a strange error.
The piece of code is:
Code: Select all
cpSpace *space = cpSpaceNew();
if (space == NULL) { return(0); }
cpSpaceSetGravity(space, cpv(0,0));
cpShape *ground1 = cpSegmentShapeNew(space->staticBody, cpv(0, 0), cpv(RES_WIDTH-1, 0), 0);
Code: Select all
error: dereferencing pointer to incomplete type
cpShape *ground1 = cpSegmentShapeNew(space->staticBody, cpv(0, 0), cpv(RES_WIDTH-1, 0), 0);
^
Note: I don't have the chipmunk package from ubuntu installed (as it is an older version).
By the way I was re-using an old code using Chipmunk and it seems that cpShapeSetLayers() function don't exists anymore.
Thanks for any help.
Regards,
--
Hexasoft