I have just added 64 bit support for my iPad app in Xcode. Before the update i was able to archive the app with no red errors. After i add arm64 in the build settings get 2 error preventing the archive:
*ld: warning: ignoring file /Users/****/Documents/mApp/****/Pixate.framework/Pixate, missing required architecture arm64 in file /Users/****/Documents/mApp/****/Pixate.framework/Pixate (3 slices)
Undefined symbols for architecture arm64:
"_OBJC_CLASS_$_Pixate", referenced from:
objc-class-ref in main.o
objc-class-ref in BaseView.o
objc-class-ref in BaseViewController.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 checked the framework and it is showing in the frameworks in the project.
I am currently using Xcode version 6.3.2 (6D2105)
The problem is related to third party framework Pixate.framework.
This framework is not built for arm64. That's why you got these errors.
How to fix it: find the version of this framework that was built with arm64 or just build it yourself by getting code from GitHub
Related
I have created a framework & integrated in the another app(Demo). When i run this Demo app on simulator then there is not any error...
But when do i run on device its gets error.
ld: warning: ignoring file /Users/mac/Desktop/library file/Demo/pk.framework/pk, file was built for x86_64 which is not the architecture being linked (arm64): /Users/mac/Desktop/library file/Demo/pk.framework/pk
Undefined symbols for architecture arm64:
"_OBJC_CLASS_$_InterstitialAdView", referenced from:
objc-class-ref in ViewController.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Please share your experience.
I am using Xcode 9.0
Thanks
You have to know simulator and devices have different cpu types, when you build Xcode will build the app and link the libraries according to the target type.
From the error info, it seems your framework only provide the x86_64 architecture (for simulator), you should build your framework for the device architecture (arm64) instead !
I am implementing google cloud messaging in my project, and i have setup cocoapods in my project. But when I run the project it generate error, this error is
Undefined symbols for architecture armv7:
"_OBJC_CLASS_$_SKProductsRequest", referenced from:
objc-class-ref in libGGLCore.a(GMRProductsRequest.o)
"_OBJC_CLASS_$_SKPaymentQueue", referenced from:
objc-class-ref in libGGLCore.a(GMRInAppPurchaseTransactionReporter.o)
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation). I am using Xcode 7 and swift 2 and my pod version is 1.0.0.beta.2
Please help me, I am not able to solve this issue.
Read this post... After update to Xcode 5 - ld: symbol(s) not found for architecture armv7 or armv7s linker error
Basically you need to remove Build Active Architecture Only from all your static libraries' project build settings. Xcode added this with their update as it makes Xcode compile faster since it only requires Xcode to compile for the connected device, but it is causing problems in your case so you may remove it
I have add GameKit.framework and StoreKit.framework into Target>>General>>Linked Frameworks and Libraries.
clean project and build project.An error is solved
I have activated arm7 armv7 arm64 as valid architecture for 64 bit requirement by Apple recently but when I try to build the app in Xcode it throws me this error. I get a warning first for libchartboost.a not being found, I download the chartboost latest folder from their website but it does not have libchartboost.a so I am still using chartboost 3.2.1. But not sure if thats the issue since I get an error related to GameScene below. Am I missing a framework? Thanks for your help.
ld: warning: ignoring file /Users/Administrator/Documents/Software/libChartboost.a, missing required architecture arm64 in file /Users/Administrator/Documents/Software/libChartboost.a (3 slices)
Undefined symbols for architecture arm64:
"_OBJC_CLASS_$_GameScene", referenced from:
objc-class-ref in AlertLayer.o
objc-class-ref in GameLayer.o
objc-class-ref in levelpackMenuLayer.o
objc-class-ref in LevelSelectLayer.o
objc-class-ref in timetrialMenuLayer.o
objc-class-ref in IAPHelper.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Probably an old thread, but in such linker errors, following step works:
Link all the required frameworks along with Chartboost framework, such as Storekit, Webkit, AVFoundation, Foundation etc.
These are all the frameworks that are used by Chartboost framework to fetch and display ads in media formats (audio and video).
For latest details on how to fully integrate and what all frameworks are required, refer to this guide.
I've followed this bar code scanner tutorial http://rdcworld-iphone.blogspot.com.au/2013/03/how-to-use-barcode-scanner-br-and-qr-in.html which runs fine in the simulator. However it says "Build Failed" when I connect my iPhone and attempt to build it. There are no errors. My phone version is 7.1.2 if that helps.
What process should I follow to find what the cause/s of the failure are?
Edit:
I am not using an _ or space in the project name.
Edit:
Error log for iPhone:
ld: file is universal (3 slices) but does not contain a(n) armv7s slice: /Users/airefrig/Documents/BarcodeScannerDemo/BarcodeScannerDemo/ZBarSDK/libzbar.a file '/Users/airefrig/Documents/BarcodeScannerDemo/BarcodeScannerDemo/ZBarSDK/libzbar.a' for architecture armv7s
clang: error: linker command failed with exit code 1 (use -v to see invocation)
The error log for iPhone 4 64 bit simulator:
ld: warning: ignoring file /Users/airefrig/Documents/BarcodeScannerDemo/BarcodeScannerDemo/ZBarSDK/libzbar.a, missing required architecture x86_64 in file /Users/airefrig/Documents/BarcodeScannerDemo/BarcodeScannerDemo/ZBarSDK/libzbar.a (3 slices)
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_ZBarReaderViewController", referenced from:
objc-class-ref in ViewController.o
"_ZBarReaderControllerResults", referenced from:
-[ViewController imagePickerController:didFinishPickingMediaWithInfo:] in ViewController.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
(null): Ignoring file /Users/airefrig/Documents/BarcodeScannerDemo/BarcodeScannerDemo/ZBarSDK/libzbar.a, missing required architecture x86_64 in file /Users/airefrig/Documents/BarcodeScannerDemo/BarcodeScannerDemo/ZBarSDK/libzbar.a (3 slices)
(null): "_OBJC_CLASS_$_ZBarReaderViewController", referenced from:
(null): Objc-class-ref in ViewController.o
(null): "_ZBarReaderControllerResults", referenced from:
(null): -[ViewController imagePickerController:didFinishPickingMediaWithInfo:] in ViewController.o
(null): Symbol(s) not found for architecture x86_64
(null): Linker command failed with exit code 1 (use -v to see invocation)
Edit:
I've got it to work fine on the iPhone by downloading and using the latest zbar sdk framework. Now however the simulator doesn't build as it wants the old one!
Anyone have an idea how to make both the phone and simulator happy?
Edit 2:
I got it working use the old libraries, but not the latest which is what I have to do for work. For the old libraries I did the following:
1) Create a new app and make it universal.
2) Follow the normal tutorial steps except use a storyboard not a xib file and set the project to use that for both iphone and ipad. Also don't put in the code near the end of the tute which specifies which Xib to use since I'm not using one!
3) In build settings set the Architectures and Valid Architectures to "armv7"
4) In build settings set Build Active architecture only to YES
What I've done just recently is to remove the old ZBar libraries and replace them which these http://www.nerdvision.net/app-development/ios/zbar-sdk
It gives me this error though:
ld: warning: ignoring file /blahblah/BarcodeScannerNew/BarcodeScannerNew/zbar_iOS7_Fix/libzbar.a, missing required architecture i386 in file /blahblah/BarcodeScannerNew/BarcodeScannerNew/zbar_iOS7_Fix/libzbar.a (3 slices)
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_ZBarReaderViewController", referenced from:
objc-class-ref in AACsViewController.o
"_ZBarReaderControllerResults", referenced from:
-[AACsViewController imagePickerController:didFinishPickingMediaWithInfo:] in AACsViewController.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I think what that means is it wants the old (I presume 32 bit) libraries, not the latest ones. Not sure how to fix it though as I can't include both old and new Zbar files because it gives an error about duplicate files.
Doesn't look like ZBar is supported on iOS7. Last update was around iOS4 since when a lot has changed.
Source ZBar FAQ
Error says that zBar library isn't compiled for 64-bit simulators. So you'd either build library from sources with this support or wait for somebody to do it. Or just don't use 64-bit simulator for this. :)
This answer may help you to get this working on 64-bit simulator.
Also if you can support only iOS 7+, you can use system built-in code scanning capabilities.
I am developing a fake static framework. I build it and included it another sample application. The sample application is running fine on iPhone(ios 7.1), but it giving below errors when i run it on simulator
ld: warning: ignoring file /Users/awsuser8/Desktop/Test.framework/Test, file was built for archive which is not the architecture being linked (i386): /Users/awsuser8/Desktop/Test.framework/Test
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_Test", referenced from:
objc-class-ref in ViewController.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
You can rebuild the library for the iOS Simulator and combine it using lipo with the ARM build of the library. Then the library will support x86 builds as well.