I have a home-rolled static library to which I link my iPhone app. Works great in Debug mode for Simulator, armv7 (iPhone 4), and even in my unit test app in OS X (GHUnit). However, when I try to run debug my app on my iPhone 3G with iOS 3.0, no dice. The app dies in runtime when it tries to access my library classes.
Both the app & library have
Architectures: Standard (armv6 armv7)
Valid Architectures: armv6 armv7 i386
I'm linking with "-ObjC -all_load", and I've seen some indications that -all_load can cause problems with fat binaries. Yet the armv7 version is working fine. Anybody know what's going on here? Is there a magic build incantation I'm missing?
This is quite similar to Static library dependency compiles in simulator on Xcode 3.2.3, fails on device. The halfway answer is that -all_load is causing the problem when targeting more than one architecture. The jury is still out on the definitive solution.
Related
I am implementing Spotify in my iPhone app. In iPhone4 and 4S, it builds and runs fine. But when I connected iPhone5 device and builds, it shows linker error. After disconnecting the device, the build is again success. What may be the reason. Please help me.
In your application's Build Settings, find the "Valid Architectures" setting and remove armv7s from the list. libspotify doesn't include an armv7s architecture yet, but the plain armv7 build will work perfectly fine on the iPhone 5.
I am building my application for iOS6 and i want to support armv6 so i had added the armv6 in architecture and valid architecture. Now application is giving lot of errors when build on apple llvm 4.1 but it compiles on llvm gcc 4.2. And when i build an Adhoc app using llvm gcc 4.2 then it's not installing on iphone 3GS and ipod 3G.
It's possible as kenji has given a link in the accepted Answer
Xcode 4.5 removed support for building armv6 binaries.
You can't just add armv6 to the build settings, because the support to build it isn't there.
Edited to add
Since it was requested in the comments - confirmation for this comes from the Xcode 4.5 Release Notes
I had the same error message in 4.4.1. Problem was solved by changing deployment target from 4.0 to 4.3 and removing armv6 from Architecture.
our clients also reported same error that discussed here:CLICK HERE . None of the solution in that fixed my problem…may be I did in wrong place... ……………..
Error : iPhone/iPod Touch: application executable is missing a required architecture. At least on of the following architexture(s) must be present: armv6 …………
Help me to set right settings in plist and Xcode target. OS supported iOS 4.3 and above and device both iPhone/iPad/iPod.
Here is sample Xcode project: http://po.st/0fc5AU
Please updated this sample and send me. I tried a lot but confused with all solution...again reported same bug.
Add
armv6 armv7
to the Architectures and Valid Architectures build settings of your target.
PS: if you're using cocos2d v2.x this won't work, it doesn't work with armv6 devices since they only support OpenGL ES 2.0.
I've been working with the precompiled OpenCV libraries available at eosgarden since last summer. When trying to submit our app to the app store, we noticed that if the deployment target is set to iOS 5 you are required to support the armv7 architecture. We can only support devices running iOS 5, but our app is built for armv6 because the version of OpenCV we originally downloaded was also built for armv6 (and still is).
My question is, does anyone know of an update to this library from eosgarden that is built for armv7? Is there a way to recompile these libraries?
This is my build errors:
ld: warning: ignoring file /Users/jinser/Desktop/TAapp/TAMenuApp/OpenCV/lib/iPhoneOS/lib/libcv.a, file was built for archive which is not the architecture being linked (armv7)I get the same thing for libcxcore.a, libcvaux.a, libml.a, libhighgui.a.
Thanks for the help.
I replaced my eosgarden implementation with this nice easy framework.
http://aptogo.co.uk/2011/09/opencv-framework-for-ios/
Thank you Robin Summerhill and Aptogo.
I recently upgraded my project from Xcode 4.0.1 to Xcode 4.2 - and everything went pretty smoothly, I did some debugging in the simulator and then I decided to build with device.
My device is a 2nd gen iPod Touch running 4.2.1, so I initially attempted to build to it and got this error:
An unknown error message 'IncorrectArchitecture', was received from the device.
As you do with most error messages, I googled it, and found this question.
After reading the answer, I proceeded to check up on my target architectures, and it turns out I only had armv7 as an architecture to build for. - I added the armv6 architecture, as the answer suggests, but when I built it, I got a load of build warnings/errors such as:
ignoring file /some/path/to/a/staticlibrary.a, file was built for archive which is not the architecture being linked (armv6)
This occurs on all the static libraries in my project, such as the kal library - libkal.a and all the three20 libraries.
Those libraries linked fine in Xcode 4.0.2 - and it also built fine to my iPod - so why will the armv7 architecture not build AND the libraries not link for armv6 in Xcode 4.2? - I'm really confused - any suggestions would be greatly appreciated.
Add ARMV6 to your build settings like this:
Select your build settings
Scroll to Architectures
Doubletap on the existing entry
Tap on +
Enter armv6
Tap on Done
You will need to do this for all projects that are linked with your app (e.g. three20).