Link error when trying to run project on actual iphone

When I try to run the example projects on my actual iphone5s, compilation fail and I get the link error :

Undefined symbols for architecture armv7:
“ofSetupOpenGL(int, int, int)”, referenced from:
_main in main.o
)", referenced from:
_main in main.o
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)

But the project works fine on simulators.

I’m using xcode5.0.2 and iphone5s with ios7.04

Would be grateful to hear any suggestions. Thanks!

I’m having this exact same problem. If anyone has an answer to this it would be greatly appreciated. The iPhone build of oF is just totally broken on the 5s, both the official 0.8 download from the website, and the current github master.

same problem to me… my project works well on simulator and on a real device (iPad with iOS7.1) but doesn’t work on my iPhone (iOS7.1, too), same error as above “Undefined symbols for architecture armv7”…

The way I ended up fixing it was creating a new project using the Project Generator, and copying in the source files. Using the project generator made a usable app that ran properly on all my devices (including iPhone 5s). For some reason, emptyExample is broken for 64 bit platforms.

thank you for your quick fix!

1 Like

there’s also a simpler solution:

if you don’t want to re-create the project starting from project generator, I found that you can check which architectures are missing and add them under “iOS+OFLib -> Build Settings -> Architectures -> Valid Architectures”, then clean and rebuild oF.

This worked for me with Xcode 5.1, and I just got the app running both on an iPhone5 and an iPad mini non-retina.

hope that this info could be useful to someone out there! cheers! :wink:

oF for iOS isn’t available in all flavors yet: