Undefined symbols for architecture x86_64

Code:
Undefined symbols for architecture x86_64:
  "b2World::b2World(b2Vec2 const&, bool)", referenced from:
      _main in main.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)



Code:
    b2BodyDef groundBodyDef;
    b2BodyDef bodyDef;
    b2PolygonShape dynamicBox;
    dynamicBox.SetAsBox(1.0f, 1.0f);
    b2Vec2 gravity(0.0f, 20.0f);
    b2World world(gravity, doSleep);
    b2FixtureDef fixtureDef;
    fixtureDef.shape = &dynamicBox;
    fixtureDef.density = 1.0f;
    fixtureDef.friction = 0.3f;
    groundBodyDef.position.Set(0.0f, -10.0f);
    b2Body* groundBody = world.CreateBody(&groundBodyDef);
    b2PolygonShape groundBox;
    groundBox.SetAsBox(50.0f, 10.0f);
    groundBody->CreateFixture(&groundBox,0.0f);
    bodyDef.type = b2_dynamicBody;
    bodyDef.position.Set(0.0f, 4.0f);
    b2Body* body = world.CreateBody(&bodyDef);
    body->CreateFixture(&fixtureDef);

I just started box2d and it won't compile on my mac os x 10.7.3

If I remove anything to do with Box2D it compiles fine, this isn't the whole source, but it compiles fine on my windows machine with the same version of box2d. I'm following the manual on the website and I got stuck here.

I compiled Box2D myself and I linked Box2D.h and libbox2d.a.
Are you using old headers against new source files?
Never mind, I fixed the problem by stuffing all of the headers into my project.

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