简体   繁体   English

ZBar与iOS7和XCode5编译错误libzbar.a架构

[英]ZBar with iOS7 and XCode5 compiling error libzbar.a architecture

just got some errors runnign ZBar with my iOS App. 在我的iOS App中运行ZBar时出现了一些错误。

I included the newest Beta Version 1.3.1 in my Project and am Running the App locally on my iOS7 Device (iPhone 5). 我在我的项目中包含了最新的Beta版本1.3.1 ,并在我的iOS7设备(iPhone 5)上本地运行应用程序。

When trying to archive it for Distribution, there is the error with arm64. 尝试将其存档为Distribution时,arm64出现错误。

I've tried to recompile the source to generate my own libzbar.a (which was generated) with selected arm64 armv7 and armv7s, but even here the error was the same.. 我试图重新编译源代码以生成我自己的libzbar.a(生成)与选定的arm64 armv7和armv7s,但即使在这里错误是相同的..

So what should I do? 所以我该怎么做?

存档错误

Thnaks for help! 向你求助!

You can download the zbar library compiled for arm7, arm7s and arm64 here 你可以下载编译为ARM7,arm7s和arm64的zbar和库在这里

EDIT: I am still getting upvotes on this answer, the real current answer is that now the AV Foundation framework includes barcode scanning as of iOS 7. I would recommend using this over ZBar from here on out. 编辑:我仍然对这个答案赞不绝口,目前真正的答案是,现在AV基金会框架包括iOS 7的条形码扫描。我建议从现在开始在ZBar上使用它。 Useful tutorial using AV Foundation to scan with sample code and supported types list or here 使用AV Foundation扫描示例代码和支持的类型列表此处的 有用教程

above answers don't really help 以上答案并没有真正帮助

follow this guide: 按照本指南:

http://www.federicocappelli.net/2012/10/05/zbar-library-for-iphone-5-armv7s/ http://www.federicocappelli.net/2012/10/05/zbar-library-for-iphone-5-armv7s/

But before building change the Architectures to include arm64 但在构建更改之前,架构包含arm64

I was on the ZBar train as well for quite a while dealing with these issues since they have not been updating the SDK. 由于他们没有更新SDK,我在ZBar列车上也待了很长时间处理这些问题。 Luckily if your app only has to support iOS7 onwards (which most iOS users are on now!) there is now QR Code reading support in AVFoundation so you can build your own reader very easily. 幸运的是,如果您的应用程序只需要支持iOS7以上(大多数iOS用户现在都在使用!),现在AVFoundation中有QR码阅读支持,因此您可以非常轻松地构建自己的阅读器。 Check out this tutorial: 看看这个教程:

http://www.appcoda.com/qr-code-ios-programming-tutorial/ http://www.appcoda.com/qr-code-ios-programming-tutorial/

Then bask in the beauty that is a totally Apple supported QR Code reader! 然后晒太阳是苹果支持的QR码阅读器!

Using the beta you linked and changing this setting worked for me: 使用您链接并更改此设置的测试版对我有用:

在此输入图像描述 Settings that worked: 有效的设置:

在此输入图像描述

I am able to build to the 5s and 5c. 我能够建立到5s和5c。

Try only armv7, armv7s for "Architectures" build settings. 只使用armv7,armv7s进行“架构”构建设置。 I think static library doesn't have arm64 binaries included. 我认为静态库没有包含arm64二进制文件。

For more info 有关更多信息

Xcode 5 and iOS 7: Architecture and Valid architectures Xcode 5和iOS 7:架构和有效架构

Here ( http://zbar.sourceforge.net/iphone/sdkdoc/install.html ) is the installing SDK guide, I did this and it worked perfectly. 这里( http://zbar.sourceforge.net/iphone/sdkdoc/install.html )是安装SDK指南,我这样做了,它完美地工作。

Hope it helps. 希望能帮助到你。

How i resolve the problem is link binary with libraries. 我如何解决这个问题是链接二进制文件库。 Base on the tutorial here 基于这里教程

Now Select project (Blue Icon) go to --> Build Phases --> Link Binary With Libraries. 现在选择项目(蓝色图标)转到 - >构建阶段 - >链接二进制库。 Click the + and add each of these seven frameworks. 单击+并添加这七个框架中的每一个。

  • AVFoundation.framework AVFoundation.framework
  • List item 项目清单
  • CoreGraphics.framework CoreGraphics.framework
  • CoreMedia.framework CoreMedia.framework
  • CoreAudio.framework CoreAudio.framework
  • CoreVideo.framework CoreVideo.framework
  • QuartzCore.framework QuartzCore.framework
  • libiconv.dylib (I use libz.tbd & libicon.tbd) libiconv.dylib(我使用libz.tbd和libicon.tbd)

在此输入图像描述 在此输入图像描述

**set enable bitcode --> No build! **设置启用bitcode - >没有构建! hope this help. 希望这个帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM