iOS 掃描二維碼(ZBarSDK)遇到的坑~解決方法

weixin_34402408發表於2017-06-26

//聯絡人:石虎QQ: 1224614774暱稱:嗡嘛呢叭咪哄

一、用 ZBarSDK 做掃描二維碼 匯入的庫檔案

圖1:

6083675-724920902516d5f5

二、匯入ZBarSDK 第三方框架 會出現此錯誤:

ld: warning: ignoring file /Users/mac/Desktop/掃描777/掃描777/ZBarSDK/libzbar.a, missing required architecture x86_64 in file /Users/mac/Desktop/掃描777/掃描777/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)

圖2:

6083675-2d07ace977c8b92b

三、解決ZBarSDK方法:

1.把以前的 libzbar.a 包刪除  去下載新的包.

2.連結:http://pan.baidu.com/s/1o666vJ8密碼: ik2m  試試這個支援全平臺

3.把下載的包從新匯入專案中

圖3:

6083675-25151b2d26c1088f

謝謝!!!

相關文章