Unable to compile 0.8.4 for iOS using Xcode 6.1.1, OS 10.10.2 on 64-bit iPad Air 1

I can’t compile OF 0.8.4 iOS using Xcode 6.1.1, and OS Yosemite 10.10.2 on a 64-bit iPad Air 1 running iOS 8.1 (I’ve tried the example projects and using project generator to create a new empty project.)

The same project compiles fine on my iPhone 5 (which I believe is 32 bit). I’ve spent a couple of hours researching and know that 64 bit support is being developed and will be released with OF 0.9. In the meantime, I’m trying to figure out how to continue developing my project on my iPad air with 0.8.4. In this thread on the OF forum, @pizthewiz says

No, I don’t believe openFrameworks currently has precompiled-binaries or project settings that target arm64 (iPhone 5s / iPad Air). That said, an iPhone 5s / iPad Air absolutely can run armv7 / armv7s binaries

But they don’t explain HOW to run armv7 on a 64-bit device. I realize that until my app is compiled with arm64, I won’t be able to release it to the app store (see end of same thread). But I’d like to continue developing it in good old stable 0.8.4 until 0.9 is officially released with 64 bit support. Is @pizthewiz correct - is this currently possible?

This is the error I’m getting when trying to compile on the iPad Air:

Undefined symbols for architecture armv7:
“ofSetupOpenGL(int, int, int)”, referenced from:
_main in main.o
“ofRunApp(ofBaseApp*)”, 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)

When I allow Xcode to perform the recommended changes to the project settings, I get a new error:

No architectures to compile for (ONLY_ACTIVE_ARCH=YES, active arch=arm64, VALID_ARCHS=armv6 armv7).

confirming that the iPad air’s active architecture is 64-bit. I’ve tried tweaking the architecture settings under Build Settings but haven’t been able to get anywhere. Here is an image of my current settings (which give me error #1):

Any help or advice would be much appreciated :smile: !

Hey @abrahamavnisan, saw your post on openLab but will respond here.

For 0.8.4 on iOS you will have to do the following:

So change the Architectures from Standard architectures (which on Xcode 6+ now is default (armv7, arm64)) to just armv6 armv7

The next step in the chain is the FreeImage Hack fix for Main.mm

If you would like to try out iOS 0.9.0 with new arm64 libraries and report bugs!
https://github.com/danoli3/openFrameworks/tree/Apothecary/0.9.0-All

2 Likes

Hi @danoli3 - thanks so much for your prompt response!

I’ve done what you’ve suggested but am still getting the same errors. Here is a screenshot of how my architectures are now set up:

And the changes to main.mm:

These are giving me the same errors and warnings as before:

ld: warning: ignoring file …/…/…/libs/FreeImage/lib/osx/freeimage.a, missing required architecture armv7 in file …/…/…/libs/FreeImage/lib/osx/freeimage.a (1 slices)
ld: warning: ignoring file …/…/…/libs/glu/lib/ios/glu.a, file was built for archive which is not the architecture being linked (armv7): …/…/…/libs/glu/lib/ios/glu.a
ld: warning: ignoring file /Users/abrahamavnisan/Desktop/of_Various_Builds/of_v0.8.4_ios_release/libs/openFrameworksCompiled/lib/ios/libofxiOS_iphoneos_Debug.a, file was built for archive which is not the architecture being linked (armv7): /Users/abrahamavnisan/Desktop/of_Various_Builds/of_v0.8.4_ios_release/libs/openFrameworksCompiled/lib/ios/libofxiOS_iphoneos_Debug.a
Undefined symbols for architecture armv7:
“ofSetupOpenGL(int, int, int)”, referenced from:
_main in main.o
“ofRunApp(ofBaseApp*)”, 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)

Could it be that I need to define an additional SDK?

As for 0.9.0 - I’d love to try it out and report bugs! I cloned the branch and have read over the git workflow page but having never worked directly from an OF github branch before, I’m having a little bit of trouble figuring out how to get started. There should be a way for me to run scripts from the command line that will compile the examples and project generator for the environment I’m developing for, is that right? Any idea where I might be able to find that documentation? I looked around for a while but couldn’t find anything - perhaps because I’m not using the right search terms. Let me know!

1 Like

@abrahamavnisan - did you ever get this figured out? Is anyone successfully developing for iOS with openFrameworks 0.8.4 ?

Hi @meeble - you’re trying to develop for a 64-bit device? I’ve been developing successfully for a 32-bit device for a while now with 0.8.4 (a third generation iPad retina). I ran into trouble with a newer iPad air.

After a bit of wrangling, I’ve gotten @danoli3’s 0.9.0 fork of the master branch up and running and am now finally able to successfully compile examples on my iPad air.

I was not ever able to use 0.8.4 on the newer iPad - though perhaps there is a way to do it.

Build Active Architectures: No

This should allow 0.8.4 to build. With the main.cpp free image fix.

Undefined symbols for architecture armv7:
"ofSetupOpenGL(int, int, int)", referenced from:
_main in main.o

This suggests a unclean build referencing a static openFrameworks lib binary from 0.9.
I suggest if you want to try again, make sure to clean the openFrameworks project first.
Then rebuild.

WOOF. this worked for me. brilliant. thank you so much