Sunday, 1 April 2012

Box2D-ing my brain in

It's funny how something so simple as adding an extra class to a project can cause everything to go mental, but it happens. In my case I was adding a new class... a menu... to my Cocos2D project with Box2D testbed, everything did run ok, but all of a sudden I was getting hundreds of Box2D compilation errors that looked a bit like this:
Now, I already knew that Box2D requires be part of Objective C++ files, but after a bit of research I found out that the entire project needs to be c++, well, actually it doesn't, it just needs to be run as c++. The easiest way to accomplish this is to select all of your .m files an in the right panel, under identity and type, change the File Type to be Objective-C++ source.
Problem solved...

No comments:

Post a Comment