hi
i have downloaded Box2D_v2.1.2, but i cant compile helloworld.cpp example:
i'm totaly new with box2d, i'm trying to learn from doc(pdf) but it seems use the same code of this example and i don't know what i wrong
thx
i have downloaded Box2D_v2.1.2, but i cant compile helloworld.cpp example:
Code:
1.
Linking CXX executable HelloWorld
2.
CMakeFiles/HelloWorld.dir/HelloWorld.o: In function `main':
3.
HelloWorld.cpp:(.text+0x43): undefined reference to `b2World::b2World(b2Vec2 const&, bool)'
4.
HelloWorld.cpp:(.text+0xa9): undefined reference to `b2PolygonShape::SetAsBox(float, float)'
5.
HelloWorld.cpp:(.text+0xbc): undefined reference to `b2Body::CreateFixture(b2Shape const*, float)'
6.
HelloWorld.cpp:(.text+0x12c): undefined reference to `b2PolygonShape::SetAsBox(float, float)'
7.
HelloWorld.cpp:(.text+0x166): undefined reference to `b2Body::CreateFixture(b2FixtureDef const*)'
8.
HelloWorld.cpp:(.text+0x19c): undefined reference to `b2World::Step(float, int, int)'
9.
HelloWorld.cpp:(.text+0x1a8): undefined reference to `b2World::ClearForces()'
10.
collect2: ld returned 1 exit status
11.
make[2]: *** [HelloWorld] Error 1
12.
make[1]: *** [CMakeFiles/HelloWorld.dir/all] Error 2
13.
make: *** [all] Error 2
Linking CXX executable HelloWorld
2.
CMakeFiles/HelloWorld.dir/HelloWorld.o: In function `main':
3.
HelloWorld.cpp:(.text+0x43): undefined reference to `b2World::b2World(b2Vec2 const&, bool)'
4.
HelloWorld.cpp:(.text+0xa9): undefined reference to `b2PolygonShape::SetAsBox(float, float)'
5.
HelloWorld.cpp:(.text+0xbc): undefined reference to `b2Body::CreateFixture(b2Shape const*, float)'
6.
HelloWorld.cpp:(.text+0x12c): undefined reference to `b2PolygonShape::SetAsBox(float, float)'
7.
HelloWorld.cpp:(.text+0x166): undefined reference to `b2Body::CreateFixture(b2FixtureDef const*)'
8.
HelloWorld.cpp:(.text+0x19c): undefined reference to `b2World::Step(float, int, int)'
9.
HelloWorld.cpp:(.text+0x1a8): undefined reference to `b2World::ClearForces()'
10.
collect2: ld returned 1 exit status
11.
make[2]: *** [HelloWorld] Error 1
12.
make[1]: *** [CMakeFiles/HelloWorld.dir/all] Error 2
13.
make: *** [all] Error 2
i'm totaly new with box2d, i'm trying to learn from doc(pdf) but it seems use the same code of this example and i don't know what i wrong
thx