Chipmunk cpSpaceAddCollisionHandler in C

Chipmunk cpSpaceAddCollisionHandler in C
0.0 0


I’ve been using chipmunk collision handlers on the iPhone in objC with no problems. I’m trying the same with cocos2d-x and c.

I installed the templates and created a cocos2d-x/chipmunk project, and so far everything is working great till the collisionHandler.
It’s taking me some time to get my head wrapped around obj vs c, but I’ve been making good progress.

in my HelloWorldScene.cpp I add collision types

enum _CollisionTypes {
} CollisionTypes;

Then I set the handlers as

cpSpaceAddCollisionHandler(space, BALL_TYPE, BLOCK_TYPE, blockerBegin, NULL, NULL, NULL, NULL);

And my blocker function as

static int
blockerBegin(cpArbiter arb, cpSpacespace, void unused)
emitter = (Emitter ) a~~>data;
return 0; // Return values from sensors callbacks are ignored,
And I get a ‘blockerBegin’ was not declared in this scope error.
I’ve tried adding “static int blockerBegin;” to my HelloWorldScene.h and I still get errors.
In the tests project, there a few scenes that call for collisions and they work, but in the template there’s
class HelloWorld : public cocos2d::CCLayer
static cocos2d::CCScene

I’m just not too familar with this format.

Two days fiddling with this and any help would be appreciated.

Thanks - PatS