ZBar with iOS7 and XCode5 compiling error libzbar.a architecture

为君一笑 提交于 2019-12-03 18:52:55

问题


just got some errors runnign ZBar with my iOS App.

I included the newest Beta Version 1.3.1 in my Project and am Running the App locally on my iOS7 Device (iPhone 5).

When trying to archive it for Distribution, there is the error with 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..

So what should I do?

Thnaks for help!


回答1:


You can download the zbar library compiled for arm7, arm7s and arm64 here

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. Useful tutorial using AV Foundation to scan with sample code and supported types list or here




回答2:


above answers don't really help

follow this guide:

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

But before building change the Architectures to include arm64




回答3:


I was on the ZBar train as well for quite a while dealing with these issues since they have not been updating the SDK. 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. Check out this tutorial:

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

Then bask in the beauty that is a totally Apple supported QR Code reader!




回答4:


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.




回答5:


Try only armv7, armv7s for "Architectures" build settings. I think static library doesn't have arm64 binaries included.

For more info

Xcode 5 and iOS 7: Architecture and Valid architectures




回答6:


Here (http://zbar.sourceforge.net/iphone/sdkdoc/install.html) is the installing SDK guide, I did this and it worked perfectly.

Hope it helps.




回答7:


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
  • List item
  • CoreGraphics.framework
  • CoreMedia.framework
  • CoreAudio.framework
  • CoreVideo.framework
  • QuartzCore.framework
  • libiconv.dylib (I use libz.tbd & libicon.tbd)

**set enable bitcode --> No build! hope this help.



来源:https://stackoverflow.com/questions/21140492/zbar-with-ios7-and-xcode5-compiling-error-libzbar-a-architecture

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!