Ata*_*dal 12 architecture xcode objective-c ios
我已经将我的x代码版本从5.0更新到5.1
我在我的项目中使用了ZBarSDK来扫描条形码.在模拟器'iPhone Retina(3.5英寸)'和'iPhone Retina(4英寸)',它工作正常.但是当我想用模拟器'iPhone Retina(4英寸64位)'构建时,它会出现以下错误.
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)
Run Code Online (Sandbox Code Playgroud)
架构:标准架构(arm64,armv7,armv7s) - $(ARCHS_STANDARD)
有效架构:arm64,armv7,armv7s
基础SDK:最新IOS(IOS 7.1)
iOS部署目标:iOS 6.1
任何帮助非常感谢!
Kir*_*ela 30
使用PODS
pod 'ZBarSDK'
Run Code Online (Sandbox Code Playgroud)
要么
重新编译ZBar for iphone 5.您可以从此处下载重新编译的ZBAR 以跳过以下内容
脚步
下载源代码(您必须拥有Mercurial for mac):
打开终端并运行以下命令
一个.hg clone http://zbar.hg.sourceforge.net:8000/hgroot/zbar/zbar
湾 cd zbar
C.hg checkout iPhoneSDK-1.3.1
d.打开iphone/zbar.xcodeproj
在xcode项目中编辑"libzbar"方案并选择Build in Build配置
转到遵循体系结构的构建设置集
一个.架构 - >标准架构(armv7,armv72,arm64)
湾 有效的架构 - > arm64,armv7 armv7s
为设备和模拟器编译libzbar ,这里配置:
找到已编译的libzbar.a并使用Teminal.app进入该文件夹,
在我的案例中:/ Users/kappe/Library/Developer/Xcode/DerivedData/zbar-gyozyrpbqzvslmfoadhqkwskcesd/Build/Products
在此文件夹中,您应该有两个子文件夹Release-iphoneos和Release-iphonesimulator
使用xcode命令行工具构建您的通用库:
lipo -create发布-iphoneos/libzbar.a发布-iphonesimulator/libzbar.a -o libzbar.a
现在您可以在设备和模拟器中使用创建的libzbar.a.
参考:http://www.federicocappelli.net/2012/10/05/zbar-library-for-iphone-5-armv7s/
归档时间: |
|
查看次数: |
24911 次 |
最近记录: |