OpenFrameworks Building but Not Running in Xcode?

By daniel - Posted on 02 June 2012

Just getting started with OpenFrameworks 007 in Xcode 4.2.1 and when I clicked the little play button to run some of the example apps, it would give me a "build succeeded" but wouldn't run the app. It took me a while to figure out why some projects worked and others didn't.

The problem was no application was defined in the build scheme so there was nothing to run. In fact, if you go to the Product menu the entry for Run was disabled.

Another symptom is that the .app file appears in red in the left sidebar since the link is broken and the file doesn't exist.

The solution is to navigate to "Product > Edit scheme...", select "Run" in the bar on the left of the dialogue window that pops up, and select your app file from the "Executable" dropdown.

I thought it might have to do with Xcode putting files in the derived folder as kubbing asked on StackOverflow but that setting doesn't seem to affect this issue either way.

Hope this helps some one.