Box2D Version 2.0.0 Released

I've made some subtle changes to the Code::Blocks projects, I'll upload the patch soon.

I posted this earlier to the wrong place 😛
I want to ask why did you decide to stop using b2Sqrt and use sqrtf instead directly. What have lead you to this change?

BTW thanks for the 2.0.0 🙂
I want to ask why did you decide to stop using b2Sqrt and use sqrtf instead directly.


Are you thinking of a port? I don't recall having that function in the main version.
Erin Catto wrote:
I want to ask why did you decide to stop using b2Sqrt and use sqrtf instead directly.


Are you thinking of a port? I don't recall having that function in the main version.


Ah, I found where it got there from...I used a version patched by 0xtob to be able to use fixed-point numbers and he defined b2Sqrt to hide differences betwen float and Fixed. Sorry for confusion:)
I see that version was changed to 2.0.1. Is this meaning that you will release package 2.0.1 or higher in few days with bug fixes etc. ?
also you can look at TODO file...I found that Sensors are still in 3+ section
Attached Xcode Version 2.4.1 project file (or it seems that it is actually a folder). I only added the new files and removed references to the old ones. I've never distributed xcode related stuff before, so I hope it is all ok 🙂

Looks like the OSX glut does not recognize the following line in the testbed. OSX users should just comment it out to compile (z and x allows to zoom anyway... not as cool, though).

Code: Select all

glutMouseWheelFunc(MouseWheel);
max: 2.0.1 will be a bug fix patch. I'm waiting for a few bugs to come in and get fixed before I release it. I cleaned up the TODO file.

memoni: Thanks. Some people have already supplied a Mac patches here: http://www.box2d.org/forum/viewtopic.php?f=3&t=517
max wrote:Nice work

I've checked it under my linux and it works OK. I've used QT's qmake to compile and it wasn't very hard. It only needs changing few include lines and setting correct include paths, but some makefiles would be great for inexperienced users.

Hey, I'd also like to compile the sources in linux 🙂 I'm not new to C, but without some Makefiles I don't really know where / how to start. Could you give a short description of how it works? I'm sure it would help a lot of people. If I get it running, I'll make a Makefile for the sources and post it here.

Thanks,
Chris
crazy-chris:

You can learn some about makefiles simply by looking for 'make' in google(make is part of GNU project so there will be basic documentation on their site)

But creating it for your own can be not-so-easy and ineffective. Better way is to use some automatic tool which simplifies all the process. For example I'm using KDevelop IDE for linux and when I create project and add .cpp an .h files into it the makefile will be created including all the needed stuff and some additional configuration. KDevelop has nice graphic interface where you can manage your files, add libraries and other stuff. Of course there are many other IDE's which can support this. If you are using any, check if it has something like 'makefile manager' or after building application check the source directory and search for makefile. Also there can be IDE's which use their own building system...but I think it is better to use some which can cooperate with make, because it is universal. And if you are compiling your programs from the command line like 'g++ file.cpp -o myApp' you should really look for some IDE, because it simplifies managing your projects(small and big).

There is topic on forum where you can find makefile for v1.4.0. It is written by human so it is very simple - you can modify it to work with v.2.0.0
I think someone will create it soon. If not just write a new topic so people see that it should be done.

If you need some questions about make or IDE's (but not detailed or technical) I can help you.
max wrote:crazy-chris:

You can learn some about makefiles simply by looking for 'make' in google(make is part of GNU project so there will be basic documentation on their site)
no need to get arrogant. as i said, i'm not new to makefiles, but to box2d.
max wrote:But creating it for your own can be not-so-easy and ineffective. Better way is to use some automatic tool which simplifies all the process. For example I'm using KDevelop IDE for linux and when I create project and add .cpp an .h files into it the makefile will be created including all the needed stuff and some additional configuration. KDevelop has nice graphic interface where you can manage your files, add libraries and other stuff. Of course there are many other IDE's which can support this. If you are using any, check if it has something like 'makefile manager' or after building application check the source directory and search for makefile. Also there can be IDE's which use their own building system...but I think it is better to use some which can cooperate with make, because it is universal. And if you are compiling your programs from the command line like 'g++ file.cpp -o myApp' you should really look for some IDE, because it simplifies managing your projects(small and big).
I prefer the command line and vi/nano.

max wrote:There is topic on forum where you can find makefile for v1.4.0. It is written by human so it is very simple - you can modify it to work with v.2.0.0
I think someone will create it soon. If not just write a new topic so people see that it should be done.

If you need some questions about make or IDE's (but not detailed or technical) I can help you.
pippin pointed me to the latest svn release and a patch, which, with adding the -fPIC flag, made compiling it nothing but smooth sailing 🙂

Step 1: svn co https://box2d.svn.sourceforge.net/svnroot/box2d box2d
Step 2: apply this patch: http://pippin.gimp.org/tmp/box2d-build-diff.txt
Step 3: make

If it fails with an error suggesting to add -fPIC, add it to Source/Makefile in line 13 so it looks like this:

Code: Select all

CXXFLAGS=   -g -O2 -fPIC

I will test box2d on the xo laptop tomorrow and post my results.

Best,
Chris

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