10

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.

user2393695
  • 241
  • 3
  • 7
  • I tried several suggestions centered around the "turning off armv7s" or changing 'Build Active Architecture Only' values ... none of those worked for me. I am running an iPad 3 and iOS v7.0.4. Used the link provided below via "MarkDotNet" for Federico's suggestion of simply rebuilding the ZBar source code so it will be compliant on the newest hardware/OS's. Worked like a charm. – BonanzaDriver Dec 21 '13 at 22:06

6 Answers6

15

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

cdescours
  • 6,004
  • 3
  • 24
  • 30
8

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/

markdotnet
  • 2,496
  • 2
  • 19
  • 12
1

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

Community
  • 1
  • 1
Jeremie D
  • 4,145
  • 1
  • 35
  • 41
0

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.

ahwulf
  • 2,584
  • 15
  • 29
0

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.

jasperli
  • 11
  • 1
  • 4
0

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
Arndt Bieberstein
  • 1,128
  • 1
  • 14
  • 28