0
ld: warning: ignoring file /Users/sayan/Desktop/ProjectAtanu/Omlis/Custom Classes/ZBarSDK/libzbar.a, missing required architecture x86_64 in file /Users/sayan/Desktop/ProjectAtanu/Omlis/Custom Classes/ZBarSDK/libzbar.a (3 slices)
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_ZBarReaderViewController", referenced from:
 objc-class-ref in HomeViewController.o
"_ZBarReaderControllerResults", referenced from:
-[HomeViewController imagePickerController:didFinishPickingMediaWithInfo:] in  HomeViewController.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 am using latest Xcode and iOS version in my App.

Any help much appreciated!

Codo
  • 75,595
  • 17
  • 168
  • 206
BalKrishan Yadav
  • 467
  • 7
  • 21
  • possible duplicate of [Zbar SDK - missing required architecture x86\_64](http://stackoverflow.com/questions/22660361/zbar-sdk-missing-required-architecture-x86-64) – Codo Jan 27 '15 at 07:31
  • ok how can i achieve in zbar library for QR Code. Or suggest me any QR Code reader.. Thnx – BalKrishan Yadav Jan 27 '15 at 07:47

1 Answers1

0

I was able to build a universal library with support for the simulator by following the instructions here: Build fat static library (device + simulator) using Xcode and SDK 4+ I hope that helps you too.

or up vote

USING PODS

pod 'ZBarSDK' OR

Recompile ZBar for iphone 5. You can download recompiled ZBAR from here to skip the following

Steps

Download the source code (you must have Mercurial for mac): Open Terminal and run following commands

a. hg clone http://zbar.hg.sourceforge.net:8000/hgroot/zbar/zbar

b. cd zbar

c. hg checkout iPhoneSDK-1.3.1

d. open iphone/zbar.xcodeproj In the xcode project edit the "libzbar" scheme and select Release in Build configuration Go to Build Settings set following Architectures

a. Architectures - >Standard architectures(armv7,armv72,arm64)

b. Valid Architectures -> arm64,armv7 armv7s Compile libzbar for device AND for simulator, here the configuration: Find the compiled libzbar.a and go in the folder using Teminal.app,

In My Case : /Users/kappe/Library/Developer/Xcode/DerivedData/zbar-gyozyrpbqzvslmfoadhqkwskcesd/Build/Products

In this folder you you should have two sub folder Release-iphoneos and Release-iphonesimulator using xcode command line tools build your universal lib:

lipo -create Release-iphoneos/libzbar.a Release-iphonesimulator/libzbar.a -o libzbar.a

Now you can use the libzbar.a created, both in device and simulator. Ref : http://www.federicocappelli.net/2012/10/05/zbar-library-for-iphone-5-armv7s/

Community
  • 1
  • 1
saraman
  • 568
  • 7
  • 19