I have some Framework linked as OPTIONAL (using camera), so it won't compile for Simulator, which is great. The app builds, runs fine on Simulator.
Is there any way to supress missing required architecture i386 warning when build for Simulator?
Full warning:
ld: warning: ignoring file <WhateverFramework>, missing required architecture i386 in file <WhateverFramework> (2 slices)
An "Optional" framework is optional at runtime only. It is required to be present at build time.
You can use platform-specific build settings to avoid linking to that framework at all in simulator builds.
Related
I have a 3rd party static library that hasn't been updated in a long time. As such, it does not include an iPhone simulator build for M1 Macs.
% lipo -info ./Zebra/lib/libZSDK_API.a
Architectures in the fat file: ./Zebra/lib/libZSDK_API.a are: armv7 i386 x86_64 arm64
I tried to set the "Link Binary With Libraries" to be optional for this library so I can still run on the Simulator. (The library is just for printing, and I don't need to print from the Simulator.)
The problem is that even though I have marked the static library as optional, Xcode still gives me a linker error about the missing architecture.
error build: In ../XXXX/External/Zebra/lib/libZSDK_API.a(TcpPrinterConnection.o), building for iOS Simulator, but linking in object file built for iOS, file '../XXXX/External/Zebra/lib/libZSDK_API.a' for architecture arm64
Is there any way to get around this so that Xcode does not fail the build, but just leaves the library unlinked? I thought this was the whole point of the "optional" setting on Link Binary With Libraries?
I added a wechat login to my xcode. However, these errors worked.
I do not know how to fix this error. please help me.
Apple Mach-O Linker (Id) Error
"__wechatstore",referenced from:
_Wechat__wechatstore_m13_992 in Bulk_Assembly-CSharp_1.o
_Wechat_wechatstore_m13_995 in Bulk_Assembly-CSharp_1.o
(maybe you meant: _Wechat__wechatstore_m13_992)
Symbol(s) not found for architecture arm64
Linker command failed with exit code 1 (use -v to see invocation)
Activity Log Complete
the message means that the symbol __wechatstore (which is likely a pointer to data structure) can't be found in any arm64 binary supplied to the linker. So there are a couple things that could be going wrong:
the Library with this symbol might not be getting included in compilation. (when build fails in Xcode, go to the 'report' tab in navigator, click on the failing build, and check out the failing "Link ..." task
the Library might be included but not be compiled for arm64. Now that I think of it, I think this is the most likely case. arm64 support is a newer requirement from apple to support iPad Pro. I'd be willing to bet that the library probably only includes armv7. you can find out which architectures are included by running the file command on the library.
A possible temporary solution is to stop compiling for arm64, and try out just compiling armv7: to do that go to Project > Build Settings > Architectures > Architectures and change from $(ARCHS_STANDARD) $(ARCHS_STANDARD) to armv7. (nb: idk but I wouldn't try to submit a binary without the proper architectures for the appstore)
My project uses libz.tdb in the build phases.
On the simulator, all is well. But when I try to run it on my iPhone 6, I get:
ignoring file /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.0.sdk/usr/lib/libz.tbd, missing required architecture unknown in file /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.0.sdk/usr/lib/libz.tbd (3 slices)
Why is it looking for an "unknown" architecture?
Maybe its Architectures debug and release error.
First of all go to your projects Build Settings.
then go to Architectures in Build Settings.there is debug and release option in these option you want to select Standard architectures(armv7,armv64) - $(ARCHS_STANDARD).
In your plist file add Required device capabilities as string armv7.
May its working.
I am receiving this linking error in Xcode for the Realm Framework files. I have searched and found users with similar errors with other frameworks. However, I have tried to apply the solutions but nothing seems to work. I haven't found any solutions for a recent version of Xcode.
The this only occurs when building for my device. Everything works in the iOS Simulator.
ld: warning: ignoring file /Users/Developer/Swift/App/RealmSwift.framework/RealmSwift, missing required architecture armv7 in file /Users/Developer/Swift/RealmSwift.framework/RealmSwift (2 slices)
ld: warning: ignoring file /Users/Developer/Swift/Realm.framework/Realm, missing required architecture armv7 in file /Users/Developer/Swift/Realm.framework/Realm (2 slices)
Undefined symbols for architecture armv7:
I am using:
Xcode 6.3.2 Swift
Realm Swift 0.93.1
I removed all of the frameworks then dragged them back in to the project. I had to create an empty Frameworks folder below RealmSwift.Framework/Headers (Not in the installation instructions on the Realm site). Everything is now compiling on my device.
I'm using xcode 4.5 My Base SDK is 6.0 and my deployment target is 5.1. When I try to build for release or profiling I get this little gem of an error.
ld: file is universal (4 slices) but does not contain a(n) armv7s slice: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk/usr/lib/crt1.3.1.o for architecture armv7s
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Now....
I have seen this message posted on stackoverflow but Im still none the wiser.
What exactly is this crt1.2.1.o thats causing all the fuss?
Can I modify it somehow to kill my error?
And finally it has been suggested that I simply set build for active architectures only. What are the implications of doing this?
Thanks
The crt1.3.1.o file contains the startup code for the C runtime library. This initializes the runtime, calls global initializers and finally calls the main function.
Something must be amiss with your project settings. You are compiling for armv7s as well, but the libraries are being linked from the iOS 5.1 SDK which doesn't support the armv7s architecture yet.
I had this same issue, I removed armv7s from valid architectures in build settings and left only armv7, after that I could archive my project