Error including header

Discuss any Chipmunk bugs here.

Error including header

Postby clynamen » Wed Feb 08, 2012 9:00 am

I was writing a game with chipmunk in c++, the chipmunk functions are recognized by the compiler, but now that I had added a new class with this code

Code: Select all
        mBody = cpSpaceAddBody(space, cpBodyNew(1.0f, cpMomentForBox(1.0f, 30.0f, 30.0f)));
        cpbodysetpos(mBody, cpv(0, 0));
        mShape = cpspaceaddshape(space, cpboxshapenew(mBody, 30.0f, 30.0f));
        cpshapesetelasticity(mShape, 0.0f);
        cpshapesetfriction(mShape, 0.8f);

the chipmunk method became undeclared for the compiler, even if I included the chipmunk header.

The strange thing is that the same functions in an another class work well.

ehm, little ashamed for this, somehow i turn the function name low case. I didn't see it and I was thinking about a cmakelist error. sorry
Posts: 1
Joined: Wed Feb 08, 2012 8:54 am

Re: Error including header

Postby slembcke » Wed Feb 08, 2012 11:15 am

I have no idea why that same snippet of code would work in a different place. I've never heard of a C/C++ compiler that wasn't case sensitive.
Can't sleep... Chipmunks will eat me...
Check out our latest projects! ->
User avatar
Site Admin
Posts: 4164
Joined: Tue Aug 14, 2007 7:13 pm

Return to Bugs

Who is online

Users browsing this forum: No registered users and 1 guest