Get the latest Box2D release from github link as the zip form.
Unzip it and put into any directory you like.
Box2D > CMakeLists.txt, as below :
Then remove this few lines including glui, freeglut and test bed into the compilation, so that you won't need to add them in, as below :
Then save it.
Then head to
Box2D > Box2D > CMakeLists.txt, add this line on top :
You can change to your version of cmake also.
Just ignore them and click
Configure again. You should see it getting configuration done like this :
If its done, just click
Generate there. A
Generating done will be logged out.
Then go to
Box2D > Build,
Spawn a terminal there and run
Wait until it finished running.
Then go to
Box2D > Build > Box2D, you will find
libBox2D.a there, as below :
MinGW > lib.
Box2D > Box2D, the
root Box2D directoryinto `MinGW > include'.
- Then in CodeBlock, open
Settings > Compiler > Linker Settings > Add Libraryand Select
MinGW > lib > libBox2D.a.
Test it out, here is a test cpp from my uni course gist.
I am just merely trying to challenge myself to compile it and not following instructions.
I tested the compiled lib with a uni provided cpp along with sfml, somehow it works without glui and freeglut.