Using Box2D without Cocos2D - Lexical or Preprocessor Issues

Hello,

I am having trouble including Box2D into my XCode project. I am NOT using Cocos2D! Here is what I do so far:

- I create a new iPhone project from scratch and drag the Box2D folder into my project (does it matter where I drag it? Maybe into Supporting Files?)
- I include "Box2D.h and try to run. Boom! 6 errors:

b2CollideEdge.cpp
Lexical or Preprocessor Issue 'Box2D/Collision/b2Collision.h' file not found
b2CollideCircle.cpp
Lexical or Preprocessor Issue ...
Box2D.h
Lexical or Preprocessor Issue...
and so on...


What am I doing wrong? Thanks for any help or advice.

.
How stupid. Of course I forgot to rename the classes to .mm :-S

.
I did not have to rename them to .mm. That is not a required step. You need to add Box2D to your target's include paths (in my XCode 4.2, it is called "Header Search Paths" under the Build Settings tab.

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