My app have errors about supporting 64 bit.
I was change some settings from main project and library(inner project).
Architectures -> Standard architectures(armv7, arm64)
Valid Architectures -> add 'arm64'
iOS Deployment Target -> iOS 7.0
But xcode printed this text.
Undefined symbols for architecture arm64:
"_inv", referenced from:
-[abc pointTo:] in aLibrary.a(abc.o)
.
.
.
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I need help about this.
I had also faced that issue.But in my case it got solved when i have added arm64 at first place in Valid architectures sequence.
e.g Valid Architectures:arm64 armv7s armv7.
I hope this will help you.
Related
I use this pod to show ads in the app: https://cocoapods.org/pods/AdColony
I completed the SDK implementation with no errors.
But I'm getting this error when I try to run the app on the device: (iPhone)
Undefined symbols for architecture arm64:
"_OBJC_CLASS_$_SKAdImpression", referenced from:
objc-class-ref in AdColony(ADCAdSession.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Constructing build description
What I tried:
In build settings, set ARCHS = armv7 armv7s and VALID_ARCHS = armv6 armv7 armv7s arm64.
In build settings, added $(inherited) to Other Linker Flags.
In build settings, set Build Active Architecture Only to YES.
Downloaded the pod added to the project manually.
Checked the minimum deploy target version of the SDK. That fits with the project.
Unchecked Parallelize Build in Product > Scheme > Edit Scheme
How can I solve this problem?
My project, in iPhone5s simulator running above normal, but iPhone5 compile error, an error message is as follows:
ld: warning: directory not found for option '-L/Users/apple/Desktop/……/UMSocial_Sdk_3.3.7'
ld: warning: ignoring file /Users/apple/Desktop/……_SDK/lib/libP2P_device.a, missing required architecture i386 in file /Users/apple/Desktop/……_SDK/lib/libP2P_device.a (2 slices)
ld: warning: ignoring file /Users/apple/Desktop/……/UMAnalytics_Sdk/libMobClickLibrary_armv6.a, file was built for archive which is not the architecture being linked (i386): /Users/apple/Desktop/……_Sdk/libMobClickLibrary_armv6.a
ld: warning: ignoring file /Users/apple/Desktop/……_iOS_SDK/lib/libP2P.a, file was built for archive which is not the architecture being linked (i386): /Users/apple/Desktop/……2P.a
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_InterfaceJump", referenced from:
objc-class-ref in CommonFunc.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Your project link some file didn't support i386 architecture. Maybe this file ??just support arm architecture.
You should make sure your "Build Settings" -> "Valid Architectures" didn't contain i386. iPhone5's architecture is "armv7", it shouldn't compile for architecture i386.
If your just want to build target phone architecture, you can set "Build Active Architecture Only" to YES.
I sorry, I think your iPhone5 is device, you can try to change "Valid Architecture" to only support 64bit or 32bit arm architecture, and change "Build Active Architecture Only" to have a try.
iPhone5 simulator is build fine, and iPhone5s build failed usually is arm64 problem.
I had this question going on, but now I am a little further:
I added this framework to my project:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/System/Library/Frameworks/AdSupport.framework
Now this works fine if I run the app on any device, however this framework is just for the architectures armv7, armv7s and arm64
When running the app on the simulator, the build fails because the architecture i386 is missing. This is included in:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/AdSupport.framework
How can I achieve that all architectures can be used? I played a lot with the build-settings but nothing worked so far!
error report:
ld: warning: ignoring file /Users/XXXXXXX/Documents/app1/app1/AdSupport.framework/AdSupport, missing required architecture i386 in file /Users/XXXXXXX/Documents/app1/app1/AdSupport.framework/AdSupport (3 slices)
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_ASIdentifierManager", referenced from:
objc-class-ref in libGoogleAdMobAds.a(GADDevice.o)
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Thanks a lot!
Go to the Project Target.and make architecture like below image.
/Users/XXXXXXX/Documents/app1/app1/AdSupport.framework/AdSupport is missing an i386 slice; I suspect that it was likely built for arm and not intel. It looks like that framework is external to your project, so I suggest you rebuild it for the simulator.
You can check the current architectures of the framework by running file /Users/XXXXXXX/Documents/app1/app1/AdSupport.framework/AdSupport
I have a project that uses CocoaPods. It was working but something got broken.
It does compile if I target the simulator, but If I target the devise (Build or Archive) it throws a linker error.
ld: warning: ignoring file /Users/myuser/ios/share/share/libPods.a, file was built for archive which is not the architecture being linked (armv7s): /Users/myuser/ios/share/share/libPods.a
Undefined symbols for architecture armv7s:
"_OBJC_CLASS_$_AFHTTPRequestOperationManager", referenced from:
objc-class-ref in BackendProxy.o
ld: symbol(s) not found for architecture armv7s
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I really need some help because I am really stucked.
Thanks!
EDIT: i deleted that libPods.a, that was an old one, and now it's giving me:
ld: library not found for -lPods
But only on Archive or Build for iosDevice, this is still working on the simulator.
Try removing armv7s from valid architectures section.
Build Settings -> Architectures -> Valid Architectures
I am having an issue adding the MagTek library and header. After they are added (I followed all the information I could find) I get this error:
Undefined symbols for architecture arm64:
"_OBJC_CLASS_$_MTSCRA", referenced from:
objc-class-ref in CONAppDelegate.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I have wasted so much time figuring this out. I am using Xcode 5. Any Help would be appreciated.
The MagTek library must not 64-bit and you are trying to run against the iPhone 64-bit simulator and/or on the iPhone 5s. In your "Build Settings," under "Architectures," try changing to $(ARCHS_STANDARD_32_BIT) or $(ARCHS_STANDARD) to not build the 64-bit version as a workaround.
It worked for me with following changes ( In your "Build Settings," under "Architectures"),
Removed arm64 from the list of 'Valid Architectures'
'Build Active Architecture Only' set to 'No'
Set architectures to 'Standard Architectures'
From iOS 11 onwards all apps should be in 64-bit, so you can get the latest iOS MagTek library at..
https://www.magtek.com/support/idynamo?tab=software