openFrameworks + Code::Blocks Install
A while back I picked up the book Programming Interactivity, since it deals with Processing, Arduino, and openFrameworks. I know a bit of Processing and Arduino, I mainly got it as a primer to help me wrap my head around c++ through openFrameworks. As I quickly learned though, as a c++ \ openFrameworks noob, there were some serious holes in getting the install working. I’m sure people that are more versed in the languages take this stuff for granted, but it took me a bit of searching. I was also surprised that I could find no all-inclusive install tutorial for using openFrameworks with Code::Blocks, the IDE the book (and apparently openFrameworks) recommend using. Took me a while to get it working, so I will log my steps here for future generations to follow. I should point out this is being done on a WinXP system.
Install Code::Blocks
openFrameworks does have a install process for Code::Blocks here. I followed that exactly after downloading the Code::Blocks binary release.
Download openFrameworks
I downloaded the ‘code blocks FAT’ file and unzipped it. One of the key pieces that was missing was where to pit this data. I had tried a variety of subdirs on my computer, but couldn’t ever get any of the openFrameworks projects to compile. Finally after a lot of web searching, I learned I needed to put it in:
c:\openframeworks
So that’s exactly what I did, and things started working better.
Run Some Examples
In Code::Blocks, I opened the ‘workspace’:
C:\openframeworks\apps\examples\textureExample\textureExample.workspace
(or any example workspace for that matter) and promptly bonked the ‘Build and Run’ button. But an error occurred:
error: 'exit' is not a member of 'std'|
After doing a bit of web searching, I ran across this post, which gives directions on how to modify the ‘ofConstants.h’ file (located C:\openframeworks\libs\openFrameworks\utils) to correct the issue.
After that, ‘Build and Run’ was appeased, and my openFrameworks career has officially started.