Box2D on Dev-Cpp - Linker error: Undefined reference to...

Hi! I'm trying to compile this example code in Dev-Cpp (4.9.9.2):
https://code.google.com/p/box2d/source/browse/trunk/Box2D/HelloWorld/HelloWorld.cpp

However, compiler says something like this:
[Linker error] undefined reference to `b2World::b2World(b2Vec2 const&)'
[Linker error] undefined reference to `b2World::CreateBody(b2BodyDef const*)'
...

So what I have done wrong and how I can fix this? Do I need to give some parameters for linker or what?

Thanks in advance 🙂
Sounds like you need to add the Box2D library to your project. Of course, that means you would need to build the library first.

If you have built it, you should have a libBox2d.a file somewhere in your source code tree. I have never used devcpp but most IDEs have some kind of linker options dialog where you can make settings like that.

If you have not built the library, you can simply add all the Box2D source code files to your project instead.

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