heres a makefile

Ok, that worked, but I'm still lost. 😳
I tought I'd end up with a .a file and just put it in the lib folder of mingw and then I could compile without IDE's.
What should I do now with these .a and .o files?
One thing you could do with the .a files is to copy them to your mingw/lib folder and rename the one you want to libbox2d.a.

This can then be used when compiling any program using box2d by adding the argument -lbox2d to gcc (that's an lowercase L).

But if you want to use box2d you will have to have the headers aswell. The simplest sollution to this is to go into Box2d/include and edit the file named Box2d.h, remove the ../Source/ at the beginning of each include (eg ../Source/Collission -> ./Collission) and then copy everything from the real Source directory into the include directory and remove all the uneccesary .cpp files.

In case you don't feel like doing all that crap, i've taken the liberty of attaching a .tar file here which has a directory called box2d in it. Copy this to mingw/include (so you get mingw/include/box2d/Box2d.h and all the other directories in there).

Now when this is done, you should be able to compile this small program:

Code:
#include <box2d/Box2d.h>

int main()
{
  b2AABB worldAABB;
  worldAABB.lowerBound.Set(-100.0f, -100.0f);
  worldAABB.upperBound.Set(100.0f, 100.0f);
 
  b2Vec2 gravity(0.0f, -10.0f);
  bool doSleep = true;

  b2World world(worldAABB, gravity, doSleep);
  return 0;
}


By typing: gcc <source file> -lbox2d -o test.exe

Hope it works out for you : P. The include files are a mess in 2.0.1.
You have no idea how grateful I am, thanks a lot really. It worked perfectly.
To compile the Box2d Hello World I had to use the float .a, as the fixed one didn't work.
I'm so happy I can now use EditPlus for my Box2D project 😀

udoprog, you're a genius and the coolest guy ever, thanks a lot.
Thanks, just passing the knowledge 🙂 .

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