Game Development Reference
In-Depth Information
In Figure 13-2 , note the expanded directory Box2D at the top. This is the directory you want to add
to your Xcode project. I did this by copying the Box2D directory into the project folder before using
Xcode's “Add Files to . . . ” feature. This makes sure the files that are added to the project stay in a
folder called Box2D. This is not exactly required, but it simplifies importing and compiling the files
down the road.
Once the source code is added, make sure all of the cpp files are considered “Default - C++
Source,” as shown in Figure 13-3 .
Figure 13-3. Details of a cpp file
Also, make sure that all of the cpp files are included in your main build target, as shown by the check
box at the bottom of Figure 13-3 . At this point, your project will not compile; you have to set your
Header Search Paths to ../**, as shown in Figure 13-4 .
 
Search WWH ::




Custom Search