You'll need to install at least version 4.7 of the GNU compiler collection. The code in this project makes extensive use of the C++11 language which requires at least GCC 4.7 to compile. At the time of writing this guide the Raspbian OS comes installed with only GCC 4.6. If you're not sure what version is installed, run the 'g++ --version' command in a terminal.
To install GCC 4.7 execute the following command in a terminal session on the Raspberry Pi:
sudo apt-get install gcc-4.7 g++-4.7
Note: If you're compiling this project to run on a Mac, unfortunately openFrameworks does not currently work with C++11 on Mac OSX. Support is in progress and you can follow this bug for more details. This issue won't affect running on a Raspberry Pi or other platforms.
Next make sure you have the version control system git installed. Git will be used to download the code for this project. To install git, run the following command:
sudo apt-get install git
Once the dependencies are met you can download and compile the code for this project from its home on github. In a terminal session navigate to the apps/myApps directory beneath the openFrameworks root folder. If you installed openFrameworks to the default location in the previous install steps, this will be your /home/pi/openFrameworks/apps/myApps folder.
Inside the myApps folder, execute the following command to download the project code:
git clone https://github.com/tdicola/creepyportrait
Navigate into the creepy portrait subfolder and compile the project by executing these commands:
The project should compile successfully after about 5-10 minutes. If you run into an error, check that you've followed the steps to successfully compile openFrameworks and a sample application.
Skip back to the Software page in this guide to learn about the usage of the program.
Continue on to learn about how to modify the program and use it for future projects.