I have got this result (after modified some changed interface, but I really don't know how to solve the cpShape->group
, it was gone and I found a cpShapeFilter
which has group):
D:\Work\Sources\Chipmunk2D\build>ninja
[4/5] Building C object Demo/CMakeFile...chipmunk_demos.dir/ContactPoints.c.obj
FAILED: D:\MinGW\bin\gcc.exe -std=gnu99 -O3 -DNDEBUG -ffast-math -I../include
-I../include/chipmunk -ID:/MinGW/include -MMD -MT Demo/CMakeFiles/chipmunk_demos
.dir/ContactPoints.c.obj -MF "Demo/CMakeFiles/chipmunk_demos.dir/ContactPoints.c
.obj.d" -o Demo/CMakeFiles/chipmunk_demos.dir/ContactPoints.c.obj -c ../Demo/C
ontactPoints.c
../Demo/ContactPoints.c: In function 'init':
../Demo/ContactPoints.c:50:2: warning: implicit declaration of function 'cpSpace
SetDefaultCollisionHandler' [-Wimplicit-function-declaration]
cpSpaceSetDefaultCollisionHandler(space, NeverCollide, NULL, NULL, NULL, NULL)
;
^
../Demo/ContactPoints.c:57:3: error: too few arguments to function 'cpMomentForS
egment'
cpBody *body = cpSpaceAddBody(space, cpBodyNew(mass, cpMomentForSegment(mass,
a, b)));
^
In file included from ../include/chipmunk/chipmunk_private.h:28:0,
from ../Demo/ContactPoints.c:27:
../include/chipmunk/chipmunk.h:156:9: note: declared here
cpFloat cpMomentForSegment(cpFloat m, cpVect a, cpVect b, cpFloat radius);
^
../Demo/ContactPoints.c:58:3: warning: implicit declaration of function 'cpBodyS
etPos' [-Wimplicit-function-declaration]
cpBodySetPos(body, cpv(-160.0f, -80.0f));
^
../Demo/ContactPoints.c:68:3: error: too few arguments to function 'cpMomentForS
egment'
cpBody *body = cpSpaceAddBody(space, cpBodyNew(mass, cpMomentForSegment(mass,
a, b)));
^
In file included from ../include/chipmunk/chipmunk_private.h:28:0,
from ../Demo/ContactPoints.c:27:
../include/chipmunk/chipmunk.h:156:9: note: declared here
cpFloat cpMomentForSegment(cpFloat m, cpVect a, cpVect b, cpFloat radius);
^
../Demo/ContactPoints.c:84:3: error: too few arguments to function 'cpMomentForP
oly'
cpBody *body = cpSpaceAddBody(space, cpBodyNew(mass, cpMomentForPoly(mass, NU
M_VERTS, verts, cpvzero)));
^
In file included from ../include/chipmunk/chipmunk_private.h:28:0,
from ../Demo/ContactPoints.c:27:
../include/chipmunk/chipmunk.h:162:9: note: declared here
cpFloat cpMomentForPoly(cpFloat m, int count, const cpVect *verts, cpVect offse
t, cpFloat radius);
^
../Demo/ContactPoints.c:87:3: error: incompatible type for argument 4 of 'cpPoly
ShapeNew'
cpSpaceAddShape(space, cpPolyShapeNew(body, NUM_VERTS, verts, cpvzero));
^
In file included from ../include/chipmunk/chipmunk.h:132:0,
from ../include/chipmunk/chipmunk_private.h:28,
from ../Demo/ContactPoints.c:27:
../include/chipmunk/cpPolyShape.h:33:10: note: expected 'cpTransform' but argume
nt is of type 'cpVect'
cpShape* cpPolyShapeNew(cpBody *body, int count, const cpVect *verts, cpTransfo
rm transform, cpFloat radius);
^
../Demo/ContactPoints.c:87:3: error: too few arguments to function 'cpPolyShapeN
ew'
cpSpaceAddShape(space, cpPolyShapeNew(body, NUM_VERTS, verts, cpvzero));
^
In file included from ../include/chipmunk/chipmunk.h:132:0,
from ../include/chipmunk/chipmunk_private.h:28,
from ../Demo/ContactPoints.c:27:
../include/chipmunk/cpPolyShape.h:33:10: note: declared here
cpShape* cpPolyShapeNew(cpBody *body, int count, const cpVect *verts, cpTransfo
rm transform, cpFloat radius);
^
../Demo/ContactPoints.c:100:3: error: too few arguments to function 'cpMomentFor
Poly'
cpBody *body = cpSpaceAddBody(space, cpBodyNew(mass, cpMomentForPoly(mass, NU
M_VERTS, verts, cpvzero)));
^
In file included from ../include/chipmunk/chipmunk_private.h:28:0,
from ../Demo/ContactPoints.c:27:
../include/chipmunk/chipmunk.h:162:9: note: declared here
cpFloat cpMomentForPoly(cpFloat m, int count, const cpVect *verts, cpVect offse
t, cpFloat radius);
^
../Demo/ContactPoints.c:103:3: error: incompatible type for argument 4 of 'cpPol
yShapeNew'
cpSpaceAddShape(space, cpPolyShapeNew(body, NUM_VERTS, verts, cpvzero));
^
In file included from ../include/chipmunk/chipmunk.h:132:0,
from ../include/chipmunk/chipmunk_private.h:28,
from ../Demo/ContactPoints.c:27:
../include/chipmunk/cpPolyShape.h:33:10: note: expected 'cpTransform' but argume
nt is of type 'cpVect'
cpShape* cpPolyShapeNew(cpBody *body, int count, const cpVect *verts, cpTransfo
rm transform, cpFloat radius);
^
../Demo/ContactPoints.c:103:3: error: too few arguments to function 'cpPolyShape
New'
cpSpaceAddShape(space, cpPolyShapeNew(body, NUM_VERTS, verts, cpvzero));
^
In file included from ../include/chipmunk/chipmunk.h:132:0,
from ../include/chipmunk/chipmunk_private.h:28,
from ../Demo/ContactPoints.c:27:
../include/chipmunk/cpPolyShape.h:33:10: note: declared here
cpShape* cpPolyShapeNew(cpBody *body, int count, const cpVect *verts, cpTransfo
rm transform, cpFloat radius);
^
../Demo/ContactPoints.c: At top level:
../Demo/ContactPoints.c:140:2: warning: initialization from incompatible pointer
type [enabled by default]
update,
^
../Demo/ContactPoints.c:140:2: warning: (near initialization for 'ContactPoints.
updateFunc') [enabled by default]
[4/5] Building C object Demo/CMakeFiles/chipmunk_demos.dir/GJK.c.obj
FAILED: D:\MinGW\bin\gcc.exe -std=gnu99 -O3 -DNDEBUG -ffast-math -I../include
-I../include/chipmunk -ID:/MinGW/include -MMD -MT Demo/CMakeFiles/chipmunk_demos
.dir/GJK.c.obj -MF "Demo/CMakeFiles/chipmunk_demos.dir/GJK.c.obj.d" -o Demo/CMak
eFiles/chipmunk_demos.dir/GJK.c.obj -c ../Demo/GJK.c
../Demo/GJK.c: In function 'init':
../Demo/GJK.c:64:9: error: 'cpShape' has no member named 'group'
shape1->group = 1;
^
../Demo/GJK.c:73:9: error: 'cpShape' has no member named 'group'
shape2->group = 1;
^
[4/5] Building C object Demo/CMakeFile.../chipmunk_demos.dir/ChipmunkDemo.c.obj
FAILED: D:\MinGW\bin\gcc.exe -std=gnu99 -O3 -DNDEBUG -ffast-math -I../include
-I../include/chipmunk -ID:/MinGW/include -MMD -MT Demo/CMakeFiles/chipmunk_demos
.dir/ChipmunkDemo.c.obj -MF "Demo/CMakeFiles/chipmunk_demos.dir/ChipmunkDemo.c.o
bj.d" -o Demo/CMakeFiles/chipmunk_demos.dir/ChipmunkDemo.c.obj -c ../Demo/Chip
munkDemo.c
../Demo/ChipmunkDemo.c: In function 'Display':
../Demo/ChipmunkDemo.c:357:2: error: too few arguments to function 'glfwSwapBuff
ers'
glfwSwapBuffers();
^
In file included from ../Demo/GL/glfw.h:1:0,
from ../Demo/ChipmunkDemo.c:40:
d:\mingw\include\glfw\glfw3.h:2445:14: note: declared here
GLFWAPI void glfwSwapBuffers(GLFWwindow* window);
^
../Demo/ChipmunkDemo.c: In function 'RunDemo':
../Demo/ChipmunkDemo.c:406:2: warning: passing argument 1 of 'glfwSetWindowTitle
' from incompatible pointer type [enabled by default]
glfwSetWindowTitle(DemoTitle(index));
^
In file included from ../Demo/GL/glfw.h:1:0,
from ../Demo/ChipmunkDemo.c:40:
d:\mingw\include\glfw\glfw3.h:1388:14: note: expected 'struct GLFWwindow *' but
argument is of type 'char *'
GLFWAPI void glfwSetWindowTitle(GLFWwindow* window, const char* title);
^
../Demo/ChipmunkDemo.c:406:2: error: too few arguments to function 'glfwSetWindo
wTitle'
glfwSetWindowTitle(DemoTitle(index));
^
In file included from ../Demo/GL/glfw.h:1:0,
from ../Demo/ChipmunkDemo.c:40:
d:\mingw\include\glfw\glfw3.h:1388:14: note: declared here
GLFWAPI void glfwSetWindowTitle(GLFWwindow* window, const char* title);
^
../Demo/ChipmunkDemo.c: In function 'MouseToSpace':
../Demo/ChipmunkDemo.c:465:2: warning: passing argument 1 of 'glfwGetWindowSize'
from incompatible pointer type [enabled by default]
glfwGetWindowSize(&ww, &wh);
^
In file included from ../Demo/GL/glfw.h:1:0,
from ../Demo/ChipmunkDemo.c:40:
d:\mingw\include\glfw\glfw3.h:1455:14: note: expected 'struct GLFWwindow *' but
argument is of type 'int *'
GLFWAPI void glfwGetWindowSize(GLFWwindow* window, int* width, int* height);
^
../Demo/ChipmunkDemo.c:465:2: error: too few arguments to function 'glfwGetWindo
wSize'
glfwGetWindowSize(&ww, &wh);
^
In file included from ../Demo/GL/glfw.h:1:0,
from ../Demo/ChipmunkDemo.c:40:
d:\mingw\include\glfw\glfw3.h:1455:14: note: declared here
GLFWAPI void glfwGetWindowSize(GLFWwindow* window, int* width, int* height);
^
../Demo/ChipmunkDemo.c: In function 'SetupGLFW':
../Demo/ChipmunkDemo.c:559:2: warning: implicit declaration of function 'glfwOpe
nWindow' [-Wimplicit-function-declaration]
cpAssertHard(glfwOpenWindow(640, 480, 8, 8, 8, 8, 0, 0, GLFW_WINDOW), "Error o
pening GLFW window.");
^
In file included from ../include/chipmunk/chipmunk_private.h:28:0,
from ../Demo/ChipmunkDemo.c:42:
../Demo/ChipmunkDemo.c:559:58: error: 'GLFW_WINDOW' undeclared (first use in thi
s function)
cpAssertHard(glfwOpenWindow(640, 480, 8, 8, 8, 8, 0, 0, GLFW_WINDOW), "Error o
pening GLFW window.");
^
../include/chipmunk/chipmunk.h:68:47: note: in definition of macro 'cpAssertHard
'
#define cpAssertHard(__condition__, ...) if(!(__condition__)){cpMessage(#__cond
ition__, __FILE__, __LINE__, 1, 1, __VA_ARGS__); abort();}
^
../Demo/ChipmunkDemo.c:559:58: note: each undeclared identifier is reported only
once for each function it appears in
cpAssertHard(glfwOpenWindow(640, 480, 8, 8, 8, 8, 0, 0, GLFW_WINDOW), "Error o
pening GLFW window.");
^
../include/chipmunk/chipmunk.h:68:47: note: in definition of macro 'cpAssertHard
'
#define cpAssertHard(__condition__, ...) if(!(__condition__)){cpMessage(#__cond
ition__, __FILE__, __LINE__, 1, 1, __VA_ARGS__); abort();}
^
../Demo/ChipmunkDemo.c:560:2: warning: passing argument 1 of 'glfwSetWindowTitle
' from incompatible pointer type [enabled by default]
glfwSetWindowTitle(DemoTitle(demo_index));
^
In file included from ../Demo/GL/glfw.h:1:0,
from ../Demo/ChipmunkDemo.c:40:
d:\mingw\include\glfw\glfw3.h:1388:14: note: expected 'struct GLFWwindow *' but
argument is of type 'char *'
GLFWAPI void glfwSetWindowTitle(GLFWwindow* window, const char* title);
^
../Demo/ChipmunkDemo.c:560:2: error: too few arguments to function 'glfwSetWindo
wTitle'
glfwSetWindowTitle(DemoTitle(demo_index));
^
In file included from ../Demo/GL/glfw.h:1:0,
from ../Demo/ChipmunkDemo.c:40:
d:\mingw\include\glfw\glfw3.h:1388:14: note: declared here
GLFWAPI void glfwSetWindowTitle(GLFWwindow* window, const char* title);
^
../Demo/ChipmunkDemo.c:565:2: warning: passing argument 1 of 'glfwSetWindowSizeC
allback' from incompatible pointer type [enabled by default]
glfwSetWindowSizeCallback(Reshape);
^
In file included from ../Demo/GL/glfw.h:1:0,
from ../Demo/ChipmunkDemo.c:40:
d:\mingw\include\glfw\glfw3.h:1690:27: note: expected 'struct GLFWwindow *' but
argument is of type 'void (*)(int, int)'
GLFWAPI GLFWwindowsizefun glfwSetWindowSizeCallback(GLFWwindow* window, GLFWwin
dowsizefun cbfun);
^
../Demo/ChipmunkDemo.c:565:2: error: too few arguments to function 'glfwSetWindo
wSizeCallback'
glfwSetWindowSizeCallback(Reshape);
^
In file included from ../Demo/GL/glfw.h:1:0,
from ../Demo/ChipmunkDemo.c:40:
d:\mingw\include\glfw\glfw3.h:1690:27: note: declared here
GLFWAPI GLFWwindowsizefun glfwSetWindowSizeCallback(GLFWwindow* window, GLFWwin
dowsizefun cbfun);
^
../Demo/ChipmunkDemo.c:566:2: warning: passing argument 1 of 'glfwSetWindowClose
Callback' from incompatible pointer type [enabled by default]
glfwSetWindowCloseCallback(WindowClose);
^
In file included from ../Demo/GL/glfw.h:1:0,
from ../Demo/ChipmunkDemo.c:40:
d:\mingw\include\glfw\glfw3.h:1719:28: note: expected 'struct GLFWwindow *' but
argument is of type 'int (*)()'
GLFWAPI GLFWwindowclosefun glfwSetWindowCloseCallback(GLFWwindow* window, GLFWw
indowclosefun cbfun);
^
../Demo/ChipmunkDemo.c:566:2: error: too few arguments to function 'glfwSetWindo
wCloseCallback'
glfwSetWindowCloseCallback(WindowClose);
^
In file included from ../Demo/GL/glfw.h:1:0,
from ../Demo/ChipmunkDemo.c:40:
d:\mingw\include\glfw\glfw3.h:1719:28: note: declared here
GLFWAPI GLFWwindowclosefun glfwSetWindowCloseCallback(GLFWwindow* window, GLFWw
indowclosefun cbfun);
^
../Demo/ChipmunkDemo.c:568:2: warning: passing argument 1 of 'glfwSetCharCallbac
k' from incompatible pointer type [enabled by default]
glfwSetCharCallback(Keyboard);
^
In file included from ../Demo/GL/glfw.h:1:0,
from ../Demo/ChipmunkDemo.c:40:
d:\mingw\include\glfw\glfw3.h:2142:21: note: expected 'struct GLFWwindow *' but
argument is of type 'void (*)(int, int)'
GLFWAPI GLFWcharfun glfwSetCharCallback(GLFWwindow* window, GLFWcharfun cbfun);
^
../Demo/ChipmunkDemo.c:568:2: error: too few arguments to function 'glfwSetCharC
allback'
glfwSetCharCallback(Keyboard);
^
In file included from ../Demo/GL/glfw.h:1:0,
from ../Demo/ChipmunkDemo.c:40:
d:\mingw\include\glfw\glfw3.h:2142:21: note: declared here
GLFWAPI GLFWcharfun glfwSetCharCallback(GLFWwindow* window, GLFWcharfun cbfun);
^
../Demo/ChipmunkDemo.c:569:2: warning: passing argument 1 of 'glfwSetKeyCallback
' from incompatible pointer type [enabled by default]
glfwSetKeyCallback(SpecialKeyboard);
^
In file included from ../Demo/GL/glfw.h:1:0,
from ../Demo/ChipmunkDemo.c:40:
d:\mingw\include\glfw\glfw3.h:2121:20: note: expected 'struct GLFWwindow *' but
argument is of type 'void (*)(int, int)'
GLFWAPI GLFWkeyfun glfwSetKeyCallback(GLFWwindow* window, GLFWkeyfun cbfun);
^
../Demo/ChipmunkDemo.c:569:2: error: too few arguments to function 'glfwSetKeyCa
llback'
glfwSetKeyCallback(SpecialKeyboard);
^
In file included from ../Demo/GL/glfw.h:1:0,
from ../Demo/ChipmunkDemo.c:40:
d:\mingw\include\glfw\glfw3.h:2121:20: note: declared here
GLFWAPI GLFWkeyfun glfwSetKeyCallback(GLFWwindow* window, GLFWkeyfun cbfun);
^
../Demo/ChipmunkDemo.c:571:2: warning: implicit declaration of function 'glfwSet
MousePosCallback' [-Wimplicit-function-declaration]
glfwSetMousePosCallback(Mouse);
^
../Demo/ChipmunkDemo.c:572:2: warning: passing argument 1 of 'glfwSetMouseButton
Callback' from incompatible pointer type [enabled by default]
glfwSetMouseButtonCallback(Click);
^
In file included from ../Demo/GL/glfw.h:1:0,
from ../Demo/ChipmunkDemo.c:40:
d:\mingw\include\glfw\glfw3.h:2165:28: note: expected 'struct GLFWwindow *' but
argument is of type 'void (*)(int, int)'
GLFWAPI GLFWmousebuttonfun glfwSetMouseButtonCallback(GLFWwindow* window, GLFWm
ousebuttonfun cbfun);
^
../Demo/ChipmunkDemo.c:572:2: error: too few arguments to function 'glfwSetMouse
ButtonCallback'
glfwSetMouseButtonCallback(Click);
^
In file included from ../Demo/GL/glfw.h:1:0,
from ../Demo/ChipmunkDemo.c:40:
d:\mingw\include\glfw\glfw3.h:2165:28: note: declared here
GLFWAPI GLFWmousebuttonfun glfwSetMouseButtonCallback(GLFWwindow* window, GLFWm
ousebuttonfun cbfun);
^
[4/5] Building C object Demo/CMakeFiles/chipmunk_demos.dir/Smooth.c.obj
FAILED: D:\MinGW\bin\gcc.exe -std=gnu99 -O3 -DNDEBUG -ffast-math -I../include
-I../include/chipmunk -ID:/MinGW/include -MMD -MT Demo/CMakeFiles/chipmunk_demos
.dir/Smooth.c.obj -MF "Demo/CMakeFiles/chipmunk_demos.dir/Smooth.c.obj.d" -o Dem
o/CMakeFiles/chipmunk_demos.dir/Smooth.c.obj -c ../Demo/Smooth.c
../Demo/Smooth.c: In function 'DrawContacts':
../Demo/Smooth.c:34:27: error: 'struct <anonymous>' has no member named 'point'
cpVect p = set.points[i].point;
^
../Demo/Smooth.c:36:62: error: 'struct <anonymous>' has no member named 'normal'
ChipmunkDebugDrawSegment(p, cpvadd(p, cpvmult(set.points[i].normal, 10.0)), R
GBAColor(1, 0, 0, 1));
^
../Demo/Smooth.c: In function 'init':
../Demo/Smooth.c:64:2: warning: implicit declaration of function 'cpSpaceSetDefa
ultCollisionHandler' [-Wimplicit-function-declaration]
cpSpaceSetDefaultCollisionHandler(space, NULL, DrawContacts, NULL, NULL, NULL)
;
^
../Demo/Smooth.c:71:3: error: too few arguments to function 'cpMomentForSegment'
cpBody *body = cpSpaceAddBody(space, cpBodyNew(mass, cpMomentForSegment(mass,
a, b)));
^
In file included from ../include/chipmunk/chipmunk_private.h:28:0,
from ../Demo/Smooth.c:27:
../include/chipmunk/chipmunk.h:156:9: note: declared here
cpFloat cpMomentForSegment(cpFloat m, cpVect a, cpVect b, cpFloat radius);
^
../Demo/Smooth.c:72:3: warning: implicit declaration of function 'cpBodySetPos'
[-Wimplicit-function-declaration]
cpBodySetPos(body, cpv(-160.0f, 80.0f));
^
../Demo/Smooth.c:87:3: error: too few arguments to function 'cpMomentForPoly'
cpBody *body = cpSpaceAddBody(space, cpBodyNew(mass, cpMomentForPoly(mass, NU
M_VERTS, verts, cpvzero)));
^
In file included from ../include/chipmunk/chipmunk_private.h:28:0,
from ../Demo/Smooth.c:27:
../include/chipmunk/chipmunk.h:162:9: note: declared here
cpFloat cpMomentForPoly(cpFloat m, int count, const cpVect *verts, cpVect offse
t, cpFloat radius);
^
../Demo/Smooth.c:90:3: error: incompatible type for argument 4 of 'cpPolyShapeNe
w'
cpSpaceAddShape(space, cpPolyShapeNew(body, NUM_VERTS, verts, cpvzero));
^
In file included from ../include/chipmunk/chipmunk.h:132:0,
from ../include/chipmunk/chipmunk_private.h:28,
from ../Demo/Smooth.c:27:
../include/chipmunk/cpPolyShape.h:33:10: note: expected 'cpTransform' but argume
nt is of type 'cpVect'
cpShape* cpPolyShapeNew(cpBody *body, int count, const cpVect *verts, cpTransfo
rm transform, cpFloat radius);
^
../Demo/Smooth.c:90:3: error: too few arguments to function 'cpPolyShapeNew'
cpSpaceAddShape(space, cpPolyShapeNew(body, NUM_VERTS, verts, cpvzero));
^
In file included from ../include/chipmunk/chipmunk.h:132:0,
from ../include/chipmunk/chipmunk_private.h:28,
from ../Demo/Smooth.c:27:
../include/chipmunk/cpPolyShape.h:33:10: note: declared here
cpShape* cpPolyShapeNew(cpBody *body, int count, const cpVect *verts, cpTransfo
rm transform, cpFloat radius);
^
../Demo/Smooth.c: At top level:
../Demo/Smooth.c:138:2: warning: initialization from incompatible pointer type [
enabled by default]
update,
^
../Demo/Smooth.c:138:2: warning: (near initialization for 'Smooth.updateFunc') [
enabled by default]
ninja: build stopped: subcommand failed.
D:\Work\Sources\Chipmunk2D\build>