How to install Box2D for BlitzMax
Well, generally when a deadline is approaching I tend to lose focus from work
. Well having one close deadline, today I remember to refresh my BlitzMax knowledge! BlitzMax is a 2D game development environment that I bought some years ago. If you are interested on 2D game programming you should check it out. When I was doing my research, I found it to be at the exact abstract level that I needed it to be, hiding enough details from the ‘boring stuff’ and at the same time having great flexibility.
At the same time I remembered a physics library a came across recently called Box2D. So naturally I searched about Box2D for BlitzMax
After some time I was in a bit of trouble since I had to build the library myself through MaxIDE (default IDE environment for BlitzMax). I couldn’t find any straightforward directions in one place on how to do that, so I spend 1 hour before I was able to use Box2D in BlitzMax. So I will outline the directions here for you.
- First of all you need to download the Box2D mod from maxmods. Find Box2D from the list and download it.
- Then go into the mods folder of your BlitzMax directory. For me that is C:\BlitzMax\mod . In there you should already see a couple of directories. Create a new one and name it bah.mod . Enter that directory and in there copy the box2d.mod from the file you have downloaded. So now you should have the Box2D files in C:\BlitzMax\mod\bah.mod\box2d.mod
- Then head over to MinGW and download it (sourceforge link).
- Run the installer. Make sure you also choose to install g++.
- After the installation is finished you should add the environment variables. Right-click on My Computer and choose Properties. Then go to advanced tab (see figure 1). Then add a new variable as you see in figure 2. After that you have to update the system variables. Search in the list and find the path variable. Edit it, go to the end of the line and add a semicolon(;) if there is not one already there and add C:\MinGW\Bin. Save everything and you are ready to go
- Open your MaxIDE and from the menu choose Programs > Build Modules (or Ctrl+D) and everything should work.
- Now the Box2D is ready! You should be able to run the examples. If you have any questions let me know.

figure 1 - Box2D settings

figure 2 - Adding a new variable
References Box2D on BlitzMax and White Noise Blog
Related Posts:
Incoming search terms:
- how to install box2d (30)
- box2d install (13)
- box2d for blitzmax (3)
- install box2d (3)
- box2d blitzmax (2)
- install box2d ubuntu (2)
- how to use box2d with blitzmax (1)
- install 2d box (1)
- install box 2d (1)
- blitzmax box2d install (1)
Great, thank you
Hi, so, in these instructions when installing MinGW I assume you mean C++ not G++.
No I mean G++
The “gcc-g++” is for C++. See here http://www.mingw.org/wiki/InstallationHOWTOforMinGW
I ve done that, still doesn t work
Do you have to have the latest version of blitzmax?
mines 1.26. I think the latest is 1.32
Hm. I worte this post in 2009. I am not quite sure what version was it. What kind of errors do you get?
–can’t find interface for module “bah.box2d”–
Hmm. I found this http://www.blitzbasic.com/Community/posts.php?topic=92201