本文介绍了Zbar SDK无法在iOS6中运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在iOS5中使用ZBar进行扫描,效果很好。
I was using ZBar for scanning in iOS5 and it was working well.
现在更新到iOS6后,它无法运行。它显示以下错误。
Now after updating to iOS6, its not working. It shows a following error.
ld: file is universal (3 slices) but does not contain a(n) armv7s slice: /Users/mac4/Desktop/my desktop/My app/MyApp name 20:09:12 /MyApp name/ZBarSDK/libzbar.a for architecture armv7s
clang: error: linker command failed with exit code 1 (use -v to see invocation)
我方有什么问题?
推荐答案
我最近遇到了同样的问题。问题似乎是ZBar SDK还没有为armv7s架构做好准备。
i recently faced the same issue. The problem seems to be that the ZBar SDK is not ready for the armv7s architecture.
我用这种方式解决了这个问题:
I solved the problem this way:
- 转到ZBar主页并导航到mercurial存储库(直接链接)
- 以zip格式下载zbar存储库。
- 解压缩文件并导航到名为iphone的子文件夹。
- 打开XCode项目。
- 删除Examples文件夹(该文件夹导致我的机器出现构建错误)。
- 点击CMD + B并构建源代码。
- 找到新的libzbar.a文件。 (User / Library / Developer / Xcode / DerivedData / zbar ...)
- 用新的文件替换项目中的旧libzbar.a文件。
- 点击CMD + R就可以了。
- Go to the ZBar homepage and navigate to the mercurial repository (direct link)
- Download the zbar repository as zip.
- Unzip the file and navigate to the subfolder named "iphone".
- Open the XCode project.
- Delete the "Examples" folder (the folder caused a build error on my machine).
- Hit "CMD + B" and build the source.
- Find your new libzbar.a file. (User/Library/Developer/Xcode/DerivedData/zbar...)
- Replace the old libzbar.a file in your project with the new one.
- Hit "CMD + R" and you are good to go.
这篇关于Zbar SDK无法在iOS6中运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!