Zoltán Majoros, freelancer iOS developer living in Bonn, Germany.

Contact: info@arcanelab.com

Posts Tagged: openframeworks

sumitpaul:

A documentary about open source tools: “Hello World”

Source: sumitpaul

Text

Recently I wanted to do some creative coding with openframeworks on iOS and OS X, but the installation of the library didn’t go flawlessly. Here’s a short summary how to get version 0.062 to work with Xcode 3.2.5 on Mac OS X 10.6.6:

  • download the openframeworks package from the official website: http://www.openframeworks.cc/download (direct link to file)
  • extract it to an arbitrary location
  • to install the xcode templates, follow the instructions in PATH_TO_OF_DIR/xcode templates/readme.txt. (The “dragging method” didn’t work for me, though, so I had to do the “manual” install.)
  • at this point we need to compile the openframeworks library, so open PATH_TO_OF_DIR/libs/openFrameworksCompiled/project/osx/openFrameworksLib.xcodeproj
  • when I try to compile the library with the default settings, I get 111367 (no kidding!) errors, so after some experiments I figured the following projects settings need to be set (open the project settings and go to the “build” tab):
    - for Architectures set “32-bit Universal”
    - for Base SDK set “Mac OS X 10.5”
    - (optional, don’t do this if you’d like to support PPC-based Macs) for Build Active Architecture Only set TRUE (check)
    Now the library compiled for me without any errors. You can compile both “Debug” and “Release” versions.
  • now you can go ahead and create an openframeworks project in Xcode by selecting “openFrameworks” in the User Templates section and select “Mac OS X empty example” in the right panel. It is very important where you save your project: it must be located in PATH_TO_OF_DIR/apps/ARBITRARY_DIR/PROJECTNAME. For me, for example: /Users/myusername/Programming/of_preRelease_v0062_osxSL_FAT/apps/Projects/NameOfMyCoolOFProject/. If you fail to place the project at the right deepness in the directory tree, the relative paths in the project setting won’t resolve correctly, thus your project won’t compile.
  • still we are not ready, because the default project settings are somewhat outdated, so go to your project settings and change the “Base SDK” to an existing one, 10.5 could be a good choice. (It might be a good idea to change the template project settings so that you wouldn’t have to do this every time you create a new project.)
  • at this point the project will finally compile, but there is a warning remaining: “Warning: The Copy Files build phase contains this target’s Info.plist file ‘openFrameworks-Info.plist’.” To overcome this, just go and click on the “Targets” section, and in the list view find the entry named “openFrameworks-Info.plist” and delete it.

Now your project should compile without any warnings or errors. Yay, congratulations!

(Note: it might be a good idea to lower the “Mac OS X Deployment Target” to 10.5 in the project settings (for both the library and your app) if you wouldn’t like to close out people with Leopard from running your app. Also, building unibin versions of your app might be a nice thing to support people with PPC Macs, although this nearly doubles the size of your app, so decide wisely.)