Box2D_v2.1.2 examples\helloworld

hi


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



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
If you're getting 'undefined reference' errors for every (or almost every) Box2D function that appears in your code, then you may just not have the Box2D library linked correctly. (Remember, you can't just include the headers - the compiled object code needs to be available as well, either in the form of a shared or dynamically linked library, or as part of the project itself.)
ye u are right, i'm missing -L option

thx, sry for the nub thing ;(

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