Just going through the process of adding Box2d to my game, and have been struggling with getting it to compile. Tried all sorts of things, from hacking back the cocos2d svn test - to try and get an project that works. But no real success :P
Until I found this blog article: http://blog.zincroe.com/2009/05/how-to-add-box2d-to-an-iphone-xcode-project/
The big trick is renaming all your .m files to .mm - if they include any file that includes box2d (safest to do all).
You might then run into an error about malloc (if you use it like I did) - which is fixable here http://cboard.cprogramming.com/c-programming/96593-program-compile-help.html
Also if you use the latest svn of box2d - you might get an issue about it not finding all its include files? Well, you then need to "target->info->build" and add a header search path - and tick always search user paths.
Hope that helps someone! Really looking forward to getting my hands dirty with Box2d and see what wonders it will bring to my game over Chipmunk.
Justin
