Error including header

Discuss any Chipmunk bugs here.
Post Reply
clynamen
Posts: 1
Joined: Wed Feb 08, 2012 8:54 am
Contact:

Error including header

Post by clynamen »

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
User avatar
slembcke
Site Admin
Posts: 4166
Joined: Tue Aug 14, 2007 7:13 pm
Contact:

Re: Error including header

Post by slembcke »

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! -> http://howlingmoonsoftware.com/wordpress/
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests