Hi folks,
I'm having a little trouble compiling my Box2D code and I can't quite figure out why.
I'm writing in C++ and compiling in Code::Blocks and my code has compiled fine up until now.
Here's my beef:
When ever I try and compile, the only error I get is:
I'm fairly sure I've included and linked everything correctly, but I haven't used Code::Blocks or Box2D extensively before.
Mouse Joints don't seem to be particularly well documented, I've looked through the TestBed files that came with the latest Box2D release and I can't see any difference in what I am doing. If anyone can help me with this error or point me to some more documentation, it'd be a great help.
Thanks,
Wombat
I'm having a little trouble compiling my Box2D code and I can't quite figure out why.
I'm writing in C++ and compiling in Code::Blocks and my code has compiled fine up until now.
Here's my beef:
Code:
b2MouseJointDef dotDragDef;
dotDragDef.body1 = world.GetGroundBody();
dotDragDef.body2 = body;
dotDragDef.target.Set(500.0f,500.0f);
dotDragDef.maxForce = 1000.0f;
b2MouseJoint* dotDrag = world.CreateJoint(&dotDragDef);
dotDragDef.body1 = world.GetGroundBody();
dotDragDef.body2 = body;
dotDragDef.target.Set(500.0f,500.0f);
dotDragDef.maxForce = 1000.0f;
b2MouseJoint* dotDrag = world.CreateJoint(&dotDragDef);
When ever I try and compile, the only error I get is:
Code:
error: invalid conversion from `b2Joint*' to `b2MouseJoint*'
I'm fairly sure I've included and linked everything correctly, but I haven't used Code::Blocks or Box2D extensively before.
Mouse Joints don't seem to be particularly well documented, I've looked through the TestBed files that came with the latest Box2D release and I can't see any difference in what I am doing. If anyone can help me with this error or point me to some more documentation, it'd be a great help.
Thanks,
Wombat