Hi,
I can build the latest box2d with gcc 4.3 on debian stable, yet when I try to compile my C++ app with the proper -lbox2d parameter against either Source/Gen/float/ or Source/Gen/fixed it fails saying that the box2d symbols are undefined:
The same problem exists with g++-4.1 on the same debian system. Any help with this problem highly appreciated!
Cheers
Mac
I can build the latest box2d with gcc 4.3 on debian stable, yet when I try to compile my C++ app with the proper -lbox2d parameter against either Source/Gen/float/ or Source/Gen/fixed it fails saying that the box2d symbols are undefined:
Code:
mac@blacky:~/_code/wasteland$ g++-4.1 -Lbox2d/Source/Gen/float/ -lbox2d `pkg-config --cflags --libs clanCore-0.8 clanDisplay-0.8 clanGL-0.8 clanApp-0.8` -Ibox2d/Include/ frame.cpp actors.cpp game.cpp -o wasteland
/tmp/ccgitMD1.o: In function `Player::Player(CL_DisplayWindow*, b2World*, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, int)':
actors.cpp:(.text+0x9c7): undefined reference to `b2World::CreateBody(b2BodyDef const*)'
actors.cpp:(.text+0xa03): undefined reference to `b2PolygonDef::SetAsBox(float, float)'
actors.cpp:(.text+0xa31): undefined reference to `b2Body::CreateShape(b2ShapeDef*)'
actors.cpp:(.text+0xa3f): undefined reference to `b2Body::SetMassFromShapes()'
/tmp/ccgitMD1.o: In function `Player::Player(CL_DisplayWindow*, b2World*, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, int)':
actors.cpp:(.text+0xceb): undefined reference to `b2World::CreateBody(b2BodyDef const*)'
actors.cpp:(.text+0xd27): undefined reference to `b2PolygonDef::SetAsBox(float, float)'
actors.cpp:(.text+0xd55): undefined reference to `b2Body::CreateShape(b2ShapeDef*)'
actors.cpp:(.text+0xd63): undefined reference to `b2Body::SetMassFromShapes()'
/tmp/cc4sYN59.o: In function `Game::main(int, char**)':
game.cpp:(.text+0x1c2): undefined reference to `b2World::b2World(b2AABB const&, b2Vec2 const&, bool)'
game.cpp:(.text+0x46d): undefined reference to `b2World::Step(float, int)'
collect2: ld returned 1 exit status
/tmp/ccgitMD1.o: In function `Player::Player(CL_DisplayWindow*, b2World*, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, int)':
actors.cpp:(.text+0x9c7): undefined reference to `b2World::CreateBody(b2BodyDef const*)'
actors.cpp:(.text+0xa03): undefined reference to `b2PolygonDef::SetAsBox(float, float)'
actors.cpp:(.text+0xa31): undefined reference to `b2Body::CreateShape(b2ShapeDef*)'
actors.cpp:(.text+0xa3f): undefined reference to `b2Body::SetMassFromShapes()'
/tmp/ccgitMD1.o: In function `Player::Player(CL_DisplayWindow*, b2World*, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, int)':
actors.cpp:(.text+0xceb): undefined reference to `b2World::CreateBody(b2BodyDef const*)'
actors.cpp:(.text+0xd27): undefined reference to `b2PolygonDef::SetAsBox(float, float)'
actors.cpp:(.text+0xd55): undefined reference to `b2Body::CreateShape(b2ShapeDef*)'
actors.cpp:(.text+0xd63): undefined reference to `b2Body::SetMassFromShapes()'
/tmp/cc4sYN59.o: In function `Game::main(int, char**)':
game.cpp:(.text+0x1c2): undefined reference to `b2World::b2World(b2AABB const&, b2Vec2 const&, bool)'
game.cpp:(.text+0x46d): undefined reference to `b2World::Step(float, int)'
collect2: ld returned 1 exit status
The same problem exists with g++-4.1 on the same debian system. Any help with this problem highly appreciated!
Cheers
Mac