使用xcode4.5的Zxing编译出错问题解决方案

来源:互联网 发布:金宝学圻家印 知乎 编辑:程序博客网 时间:2024/04/29 21:56

环境:xcode4.6.1  zxing版本r2461  设备iphone5

问题描述:使用模拟器编译没问题,但是编译进device会出错

  ld: warning: ignoring file xx/Build/Products/Debug-iphoneos/libZXingWidget.a, file was built for archive which is not the architecture being       linked (armv7s): xx/Build/Products/Debug-iphoneos/libZXingWidget.a

     "_OBJC_CLASS_$_ZXingWidgetController", referenced from:

    objc-class-ref in MZHomePageViewController.o

    "_OBJC_CLASS_$_QRCodeReader", referenced from:

    objc-class-ref in MZHomePageViewController.o

    ld: symbol(s) not found for architecture armv7s

 

解决方案:设置“Architectures" 和 "Valid Architectures

如图所示: