Game Development Reference
In-Depth Information
Figure 13-4.
Correct Header Search Paths to Compile Box2D
At this point, your project should compile. To use the Box2D classes, you import the classes like this:
#import <Box2D/Box2D.h>
However, you will probably be importing Box2D into an Object C class, so you have to tell Xcode
that it should expect mixed C++ and Objective C code. This is done by changing the type of the file
to “Object-C++ Source,” as shown in Figure
13-5
.