linker issue

Hi i'm trying to compile a test project using box2d. I'm using netbeans and mingw on winxp. I keep getting the following error when i try to run the project:

build/Debug/MinGW-Windows/main.o:main.cpp:(.text+0xb9d): undefined reference to `b2World::b2World(b2AABB const&, b2Vec2 const&, bool)'
build/Debug/MinGW-Windows/main.o:main.cpp:(.text+0xbcf): undefined reference to `b2World::CreateBody(b2BodyDef const*)'
build/Debug/MinGW-Windows/main.o:main.cpp:(.text+0xbf5): undefined reference to `b2PolygonDef::SetAsBox(float, float)'
build/Debug/MinGW-Windows/main.o:main.cpp:(.text+0xc0d): undefined reference to `b2Body::CreateShape(b2ShapeDef*)'
collect2: ld returned 1 exit status

I can't seem to figure out why these errors appear, I included Box2d.h and it seems to be ok with class definitions, I declared some pointers like:

b2world * blah;

and these don't seem to cause any problems. Do i need to do anything other than including the box2d headers to get the linker to work? I can post source code if anyone thinks that might help. thanks in advance
hold on, did something really silly, most of those errors disappeared when i added libbox2d.a as a library.
Hi, I wonder how you added it as a library…

I get such errors when compiling but it depends the place I give to my code (in which function I place it I mean).
It's weird but I think it's the same thing as you.

How did you really solved your problem ?

Thanks ! 😀

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