I am developing my iOS app and using Addthis library but error.
error message:
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_AddThisSDK", referenced from:
objc-class-ref in MyViewController.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
If "libAddThis.a" doesn't have 64-bit support built in, that's why you are currently seeing the "Undefined symbols for architecture x86_64" error.
You won't be able to support 64-bit in your application, at least until AddThis updates their SDK to support 64-bit iOS.
So for the time being you should:
1) turn off "arm64" from the "valid architectures" & "architectures" in your app's build settings
2) e-mail the AddThis support people (e.g. via the "Post A Question" link on their iOS SDK page)and tell them to update their SDK to support 64-bit iOS.
Related
Hello I'm using a library in my project, and basically it's working on real devices, but not on simulator.
I would like to know how to add compatibility with simulator also.
I've search around, and I found some answers that should have solved my problem, but they're not doing it. (Maybe I'm doing things wrong, but still not working).
I'm getting this error:
Undefined symbols for architecture x86_64: "_OBJC_CLASS_$_Library",
referenced from:
objc-class-ref in class.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code
1 (use -v to see invocation)
I tried it on xcode7 and xcode8.
Thanks.
Maybe you're using a framework or library which was only built for ARM architecture. In that case you'll have to create fat binary which will include code for all platforms (x86 for simulator, ARM and ARM64 for iOS devices).
Currently I am converting one older sdk based project with new SDK 9.0.
I am getting one issue what I need to consult here. If I set "Build Active Architecture Only" to "YES", then it debugs successfully on my device iPhone 5.
But when I set it as "No" then it show me error at compile time. And this is showing below warning and error message.
ld: warning: ignoring file /Users/narendravaishnav/Naren/SVN Projects/MyApp/libGoogleAnalytics.a, missing required architecture arm64 in file /Users/narendravaishnav/Naren/SVN Projects/MyApp/libGoogleAnalytics.a (3 slices)
Undefined symbols for architecture arm64:
"_OBJC_CLASS_$_GANTracker", referenced from:
objc-class-ref in MyAppDelegate.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Is this some older version of libGoogleAnalytics.a but this work when I am debugging with my connected device and "Build Active Architecture Only" = "YES".
Is there any quick suggestion for me to fix this ?
When you set the Build Active Architecture Only option to YES, then it builds for the connected device. Since that is an iPhone 5 with an A6 (32bit) chip, then your build succeeds. If it was an iPhone 5S then it probably would not build as it has the A7 (64bit) chip.
When you set the option to NO, then it has to build for all architectures including the newer 64 bit processors.
From the error, it looks like your installation of google analytics does not include the arm64 version. Try installing the latest version. Looks like you need version 3.03 or higher.
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
I made my own framework and everything was fine. But when Apple releases 64bit architecture when another project uses 64-bit architecture my framework doesn't want to compile.
When I changed architecture of project just armv7 and armv7s - it complies good but when i changed architecture back to arm64 - it produces error -
(null): "_OBJC_CLASS_$MYFramework", referenced from:
objc-class-ref in RWAppDelegate.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
So I've changed architecture of framework to include arm64, but error in my project still there
Is there another way to support arm64?
I added a screenshot of support architectures of framework
From error description you provided I can see that:
During linking phase for Intel 64bit architecture _OBJC_CLASS_$MYFramework symbol was not found. Which is quite strange as you sure you compiling for arm architecture. Maybe you should revise Makefiles of your framework?
Have a look here Shell you make target IOS7 32bit?
I created a static library with Xcode I have compiled selecting a device.
I added this to my library test project in Xcode 4.6
but I always have 2 errors during the linking...
I followed this tutorial: Static Library iOS Tutorial
if I download the sample code I have the same errors:
ld: warning: ignoring file /Users/Downloads/ICodeBlogStaticLibrarySample/MathTest/Classes/iCodeBlogsMathLibrary/libICodeMathUtils.a, missing required architecture i386 in file /Users/Downloads/ICodeBlogStaticLibrarySample/MathTest/Classes/iCodeBlogsMathLibrary/libICodeMathUtils.a (2 slices)
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_MathFunctions", referenced from:
objc-class-ref in MathTestAppDelegate.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I had once made a static lirary , I had the same problem .
Solution was to "Run the app on device " not on simulator , it works fine then !!!
Hope this helps...
I followed this step by step tutorial:
Tutorial
in particular I had to add these flags: -ObjC and -all_load
You must have selected iOS simulator while building the project. Select iOS device and it should be fine.
Do read and try to understand the error message, it's a meaningful English phrase.
symbol(s) not found for architecture i386
So there's no compiled code for the i386 architecture in the library. This means that either it's compiled for ARM only (for actual iOS devices, like iPhone or iPad), or for the 64-bit simulator (x86_64). Use otool to find out the architectures present in the library.