I'm using echoprint API for song search from last 3 months. But suddenly it started giving me below errors. Already I have face many problems while adding that API to my project & now it start giving me linker error. It was working for me previously.
Error like this:
"Codegen::Codegen(float const*, unsigned int, int)", referenced from: _GetPCMFromFile in File.o
clang: error: linker command failed with exit code 1 (use -v to see invocation)
ld: symbol(s) not found for architecture i386
ld: warning: directory not found for option '-L-L/Users/prajaktakulkarni/Downloads/echoprint-codegen-4.12 2/src/echoprint-codegen-ios/build/Release-iphoneos'
ld: warning: ignoring file /Users/prajaktakulkarni/Documents/Instajam/libechoprint-codegen-ios.a, missing required architecture i386 in file /Users/prajaktakulkarni/Documents/Instajam/libechoprint-codegen-ios.a (2 slices)
Undefined symbols for architecture i386:
"Codegen::Codegen(float const*, unsigned int, int)", referenced from:
_GetPCMFromFile in File.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
The error message is saying that the static library libechoprint-codegen-ios.a hasn't been built for the i386 architecture - which is the architecture used by the simulator.
You can find out which architectures the static library has been built for by running the following code in Terminal:
lipo -info ~/Documents/Instajam/libechoprint-codegen-ios.a
It will likely tell you it is built for armv7 and armv7s. That will support all but the oldest iOS devices at the time of writing.
You could build libechoprint-codegen-ios.a to run on a simulator. Here's a good stackoverflow post if you are interested in doing that: Build fat static library (device + simulator) using Xcode and SDK 4+
The easiest option would be to just plug your phone in and not worry about building a fat static library. :D
Recently the problem was fixed for me by using libz.1.1.3.tbd instead libz.tbd and of course this link is useful Echoprint iOS Missing Framework
Related
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
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'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 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 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.