Box2D Trunk build problem: Mac OS X lion

Hi,

The xcode project fails to build the Testbed & Helloworld projects on Mac 10.7 Lion. The stable build 2.2.1 works just fine. Here is the output:

Undefined symbols for architecture x86_64:
"b2MotorJointDef::Initialize(b2Body*, b2Body*)", referenced from:
MotorJoint::MotorJoint() in TestEntries.o
"b2MotorJoint::SetLinearOffset(b2Vec2 const&)", referenced from:
MotorJoint::Step(Settings*) in TestEntries.o
"b2MotorJoint::SetAngularOffset(float)", referenced from:
MotorJoint::Step(Settings*) in TestEntries.o
"b2MotorJoint::b2MotorJoint(b2MotorJointDef const*)", referenced from:
b2Joint::Create(b2JointDef const*, b2BlockAllocator*) in libBox2D.a(b2Joint.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)


Can anybody help?

I believe it works ok on Visual Studio 2010.

Thanks in advance,

Kevin.
Fixed it:

XCode had no knowledge of b2MotorJoint.h/.cpp.

Right-click on Box2D/Dynamics/Joints -> Add files to "Box2D" then navigate to: Box2D/Dynamics/Joints and add the 2 missing files.

Testbed compiles & works fine now.

HTH,

Kevin.
The cmake file is just missing the references to the motor joint which was added recently. In the file CMakeLists.txt in the Box2D/Box2D folder, look for the section:
Code:
set(BOX2D_Joints_SRCS
   Dynamics/Joints/b2DistanceJoint.cpp
   Dynamics/Joints/b2FrictionJoint.cpp
   Dynamics/Joints/b2GearJoint.cpp
   Dynamics/Joints/b2Joint.cpp
   Dynamics/Joints/b2MouseJoint.cpp
   Dynamics/Joints/b2PrismaticJoint.cpp
   Dynamics/Joints/b2PulleyJoint.cpp
   Dynamics/Joints/b2RevoluteJoint.cpp
   Dynamics/Joints/b2RopeJoint.cpp
   Dynamics/Joints/b2WeldJoint.cpp
   Dynamics/Joints/b2WheelJoint.cpp
)

... and add one line at the end like this:
Code:
set(BOX2D_Joints_SRCS
   Dynamics/Joints/b2DistanceJoint.cpp
   Dynamics/Joints/b2FrictionJoint.cpp
   Dynamics/Joints/b2GearJoint.cpp
   Dynamics/Joints/b2Joint.cpp
   Dynamics/Joints/b2MouseJoint.cpp
   Dynamics/Joints/b2PrismaticJoint.cpp
   Dynamics/Joints/b2PulleyJoint.cpp
   Dynamics/Joints/b2RevoluteJoint.cpp
   Dynamics/Joints/b2RopeJoint.cpp
   Dynamics/Joints/b2WeldJoint.cpp
   Dynamics/Joints/b2WheelJoint.cpp
   Dynamics/Joints/b2MotorJoint.cpp
)


EDIT: ok you beat me to it 😀 I will leave this here anyway for cmake users.
Seems like there are other files missing from XCode as well:

I had to add to the Tests folder:

ConveyorBelt.h
Mobile.h
MobileBalanced.h
MotorJoint.h


I'm very new to XCode, is there no way to do a 'refresh' so any other files are picked up?

Kevin.
Did you checkout the last version ?
On my computer it build fine. (But there is no Testbed file in my usr/local/bin 🙁)

Original thread: https://box2d.org/forum/viewtopic.php?t=8455