Search code examples
iosxcodecocos2d-iphonebox2dkobold2d

Box2D in Objective-C


I am currently running Kobold 1.0.4 and cannot work out how to use Box2D using Objective-C, any help will be appreciated. I have looked at the Box2d example project with kobold but it uses only c++ i need to do it in objective-c as i am not really confident playing with both.


Solution

  • Change extension of your source files from *.m to *.mm to be able to use c++ classes in them. It will allow you to create and manage box2d objects in your objective-c code