zbar SDK dont work for armv7s(iPad 4 iOS 7)

我的梦境 提交于 2019-12-09 09:23:38

问题


I replace zBar SDK in my project and faced with the problem.

ld: file is universal (3 slices) but does not contain a(n) armv7s slice: /Volumes/ZBarSDK/ZBarSDK/libzbar.a file '/Volumes/ZBarSDK/ZBarSDK/libzbar.a' for architecture armv7s
clang: error: linker command failed with exit code 1 (use -v to see invocation)

I downloaded SDK from http://nerdvision.net/app-development/ios/zbar-sdk

P.S. In simulator it work.


回答1:


You can use a custom version of ZbarSdk built for iOS 7, which can be found here : http://nerdvision.net/app-development/ios/zbar-sdk




回答2:


I didn't have any luck with the NerdVision version, but using this one worked for me immediately.

http://www.federicocappelli.net/2012/10/05/zbar-library-for-iphone-5-armv7s/




回答3:


You can download the library compiled for arm7, arm7s and arm64 here (the nerdvision link is dead)




回答4:


Turn off armv7s in your project architecture settings. It's not really necessary unless you or a library needs the few additional instructions. All it generally does is add "Optimized for iPhone 5" in the app store description.




回答5:


I just upgrade my Xcode 5.1 and iOS 7. When it is compiled onto simulators, it works without problem. When it is compiled onto iPhone 5s running under iOS 7, it is getting an error of linker command. After turn off armv7s, it works fine.




回答6:


I've created a framework using this link and the source code of the ZBarSDK. You can download the framework here. Just unzip the ZBarFramework.framework and drag it in your project. All headers in there are public. To use the framework in code you just have to import the header files.

#import <ZBarFramework/ZBarSDK.h>

// Example Controller
@interface SomeQRViewController : UIViewController <ZBarReaderViewDelegate>
@property (nonatomic, strong) IBOutlet ZBarReaderView *readerView;

@end


来源:https://stackoverflow.com/questions/19361470/zbar-sdk-dont-work-for-armv7sipad-4-ios-7

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!