Monday, November 21, 2011

How to Add Box2d to your Xcode project

- Drag the Box2D folder into your project (select "Copy items into destination group's folder (if needed)" to make a copy of the files)
- Change File Type from c.objc to cpp.objcpp (Use command-select your .m source files, then right click->Get Info->General->File Type)
  - For Xcode 4 make sure any file that includes box2d or any files that include the files that include box2d have a file type of Objective-C++ source.
- Select Project->Project Settings->Build (Use search)
- Always Search User Paths: YES
- Header Search Paths: "$(SRCROOT)" (put a tick next to recursive)
- Compile for Thumb: NO (this is because thumb is slow when using floating point)
- Other C Flags / Other C++ Flags: -DTARGET_OS_IPHONE

2 comments:

  1. Can u put ScreenShot Plz

    ReplyDelete
  2. i can not understand last 2 point can u put screen shot

    ReplyDelete