How to create a new project with addons on the raspberrypi

Hi guys,

I’m trying to create a new project based on http://learn.adafruit.com/creepy-face-tracking-portrait/future-work
But I’d like to add a new addon to it (box2d). But I’m not sure how to do that and can’t find help as every site tells me to use the project generator (which I can’t find or can’t get working for the raspi?!)

I tried it by copying the creepyface project and add the box2d addon inside of it (myProject/addons/ofBox2d) but when I try to compile (make) I get at some point errors (here are the last couple of lines before it stops compiling)

obj/linuxarmv6l/Release/addons/ofxBox2d/src/ofxBox2dBaseShape.o: In function ofxBox2dBaseShape::setRotation(float)': ofxBox2dBaseShape.cpp:(.text+0x798): undefined reference tob2Body::SetTransform(b2Vec2 const&, float)’
collect2: ld returned 1 exit status
make[1]: *** [bin/shapeFinder] Error 1
make: *** [Release] Error 2

I hope someone can help! Thank you in advance!
Kind regards
Marcel

try this:
take ofxBox2d out of myProject/addons/ofBox2d and put it into openframeworks/addons/ofBox2d

in the file called addons.make add this single line

ofxBox2d

addons.make is somewhat of a magic file to the OF Make system (also used in the examples/addons) that allows you to use many ofxAddons just by adding the name (one per line)

1 Like

it worked perfectly fine, thank you very much :slight_smile:

maybe I’ll add a follow-up question here: Can anyone recommend a way to speed up compiling on the raspi e.g. with a mac?

1 Like

here are some instructions on getting distcc to work on the mac

they should be considered “beta” but I have been able to use them on a few machines

Thanks for your answer!! :slight_smile:
is it important to first do the steps on the raspberry and then on the mac?
I tried to follow the steps on the mac first, as I don’t have the raspi with me right now
but when I try to install arm-linux-gnueabihf.pkg I get the following error:

/Desktop/arm-linux-gnueabihf.pkg exists
Warning: Your Xcode (4.6.2) is outdated
Please update to Xcode 5.0.1.
Xcode can be updated from the App Store.
Warning: distcc-3.2rc1 already installed
installer: Package name is arm-linux-gnueabihf Toolchain
installer: Installing at base path /
installer: The install failed

I’m not sure - did it ask you for your password and maybe you mistyped it?