Hi everyone,
I have recently upgraded my Box2d library in my Cocos2d project file. Everything works great, though, I haven't been able to get the debug draw to work. I have included all the Box2D files, including Render.cpp from the testbed. I am not entirely sure how to instantiate the debug draw class; looks like it's contains only static functions. Not sure what to do. Here is what I am trying:
Bit of a cryptic error message; for me, anyway. Any help would be greatly appreciated.
Thanks,
-G. ❓
I have recently upgraded my Box2d library in my Cocos2d project file. Everything works great, though, I haven't been able to get the debug draw to work. I have included all the Box2D files, including Render.cpp from the testbed. I am not entirely sure how to instantiate the debug draw class; looks like it's contains only static functions. Not sure what to do. Here is what I am trying:
Code: Select all
// Debug Draw functions
m_debugDraw = DebugDraw();
world->SetDebugDraw(&m_debugDraw);
uint32 flags = 0;
flags += b2Draw::e_shapeBit;
// flags += b2DebugDraw::e_jointBit;
// flags += b2DebugDraw::e_aabbBit;
// flags += b2DebugDraw::e_pairBit;
// flags += b2DebugDraw::e_centerOfMassBit;
m_debugDraw.SetFlags(flags);
Code: Select all
Undefined symbols for architecture i386:
"vtable for DebugDraw", referenced from:
DebugDraw::~DebugDraw()in Game.o
DebugDraw::DebugDraw()in Game.o
NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.
ld: symbol(s) not found for architecture i386
collect2: ld returned 1 exit status
Bit of a cryptic error message; for me, anyway. Any help would be greatly appreciated.
Thanks,
-G. ❓