I don’t know how to include addons in my XCode project. I’ve seen the installing addons video on the website, but it doesn’t explain how to set paths and linking (in XCode).
In the empty (XCode) example project, the first thing I do is add a group that I name addons. To that group I add existing files (of ofxBox2d and ofxVectorMath).
When I compile (without even having included the ofxbox2d header file in testApp.h), I get two error messages:
Command /Developer/usr/bin/g+±4.0 failed with exit code 1
Command /bin/sh failed with exit code 1
What am I doing wrong?
Hey, most addons are quite easy, you just drag and drop the addon folder into your xcode project (like I believe you already have done). Then there are two things to note:
- some addons may be have a dependency that requires you to edit the header search paths in the xcode project. This is quite rare and usually you don’t have to do this
- most commonly, addons will have examples in them. You need to remove these from the xcode project otherwise you will have multiple main.cpp’s and the compiler will get confused. This is most likely what is happening to you. Open the addons folder and delete the examples from your project.
Memo, thank you very much! I removed the (ofxBox2d) example from my xcode project and it compiled.