Hi! I am trying to compile my project with box2d, but as soon as i included those files i get 3000 + errors.
Do i have to configure something more to make it work?
I get errors in box2d.h like:
cpfloat file not found
cstdlib file not found
A fast, easy to use, free, and community supported 2D game engine
Hi! I am trying to compile my project with box2d, but as soon as i included those files i get 3000 + errors.
Do i have to configure something more to make it work?
I get errors in box2d.h like:
cpfloat file not found
cstdlib file not found
The file that includes box2d.h needs to have the extension .mm. This tells XCode that the file can contain c++ syntax.
Thanks, it was that!
Can anyone tell me how I can import Box2D.h into a header file without kicking up a thousand errors.
By the way there is another way to use Box2D.h in implementation files without renaming them to .mm
Right click on the implementation file > Get Info > General Tab > File Type > Set to soucecode.cpp.objcpp
Take a look at this link
http://blog.stormyprods.com/2008/11/using-static-libraries-with-iphone-sdk.html
or even better
http://www.mobileorchard.com/code-sharing-via-static-libraries-and-cross-project-references/
I like the 2nd one and tested it.
You must log in to post.