PhoneGap 和 Zxing QrCode - 构建问题

发布于 2024-10-15 00:15:40 字数 1339 浏览 3 评论 0原文

我目前在安装 ZXingWidget 时遇到问题 PhoneGap 项目。 我遵循了“PhoneGap Plugins”和ZXingWidget安装 指南,但我的项目构建失败了。 我的大多数错误(17)看起来像这样:

  • path/project/Plugins/BarcodeScanner.mm:8:0 在包含的文件中 路径/project/Plugins/BarcodeScanner.mm
  • 路径/project/Plugins/BarcodeScanner.h:11:0 在包含的文件中 路径/project/Plugins/BarcodeScanner.h
  • ../zxing-1.6/iphone/ZXingWidget/Classes/QRCodeReader.h:10:0 在文件中 包含在../zxing-1.6/iphone/ZXingWidget/Classes/QRCodeReader.h
  • ../zxing-1.6/iphone/ZXingWidget/Classes/FormatReader.h:22:0 Zxing/ common/Counted.h: ../zxing-1.6/iphone/ 中没有这样的文件或目录 ZXingWidget/Classes/FormatReader.h

这意味着我的 PhoneGap 项目找到了“BarcodeScanner.mm”, “BarcodeScanner.h”和“QRCodeReader.h”但无法到达 “FormatReader.h”? 我一步一步地检查安装指南,我想 我把ZXingWidget类的相对路径放在项目中 设置了,但我不明白我错在哪里。

我将不胜感激任何帮助。

解决方案

我忘记在 PhoneGap 项目中包含 Zxing cpp 源代码。 作为“zxing/iphone/ZXingWidget/Classes”目录,必须包含“cpp/core/src/”目录(不需要选中“递归搜索”框。) 此外,还必须将以下 iOS 框架:AVFoundation、AudioToolbox、CoreVideo、CoreMedia 和 libiconv 添加到项目中。

更好的解释: http://www.google.com/url?sa=D&q=http://code.google.com/p/zxing/source/browse/trunk/iphone /README%3Fspec%3Dsvn1651%26r%3D1651

I currently encounter a problem with installing ZXingWidget for a
PhoneGap project.
I followed both "PhoneGap Plugins" and ZXingWidget installation
guides, but my project building fails.
Most of my errors (17) look like that :

  • path/project/Plugins/BarcodeScanner.mm:8:0 In file included from
    path/project/Plugins/BarcodeScanner.mm
  • path/project/Plugins/BarcodeScanner.h:11:0 In file included from
    path/project/Plugins/BarcodeScanner.h
  • ../zxing-1.6/iphone/ZXingWidget/Classes/QRCodeReader.h:10:0 In file
    included from ../zxing-1.6/iphone/ZXingWidget/Classes/QRCodeReader.h
  • ../zxing-1.6/iphone/ZXingWidget/Classes/FormatReader.h:22:0 Zxing/
    common/Counted.h: No such file or directory in ../zxing-1.6/iphone/
    ZXingWidget/Classes/FormatReader.h

That's mean my PhoneGap project finds "BarcodeScanner.mm",
"BarcodeScanner.h" and "QRCodeReader.h" but it is not able to reach
"FormatReader.h" ?
I check again and again the installation guides step by step, I think
I put well the relative path to ZXingWidget classes in the Project
Settings, but I don't understand where I'm wrong.

I will appreciate any help.

SOLUTION

I forgot to include the Zxing cpp source in the PhoneGap project.
As the "zxing/iphone/ZXingWidget/Classes" directory, the "cpp/core/src/" directory has to be included (the "recursive search" box doesn't need to be checked.)
In addition, the following iOS frameworks: AVFoundation, AudioToolbox, CoreVideo, CoreMedia and libiconv have to be added to the project.

Better explanations :
http://www.google.com/url?sa=D&q=http://code.google.com/p/zxing/source/browse/trunk/iphone/README%3Fspec%3Dsvn1651%26r%3D1651

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

羅雙樹 2024-10-22 00:15:40

解决方案,由 craymond 发布。

我忘记在 PhoneGap 项目中包含 Zxing cpp 源代码。作为“zxing/iphone/ZXingWidget/Classes”目录,必须包含“cpp/core/src/”目录(“递归搜索”框不需要选中。)此外,以下iOS框架: AVFoundation、AudioToolbox、CoreVideo、CoreMedia 和 libiconv 必须添加到项目中。

更好的解释:http://www.google.com/url?sa=D&q=http://code.google.com/p/zxing/source/browse/主干/iphone/README%3Fspec%3Dsvn1651%26r%3D1651

SOLUTION as posted by craymond.

I forgot to include the Zxing cpp source in the PhoneGap project. As the "zxing/iphone/ZXingWidget/Classes" directory, the "cpp/core/src/" directory has to be included (the "recursive search" box doesn't need to be checked.) In addition, the following iOS frameworks: AVFoundation, AudioToolbox, CoreVideo, CoreMedia and libiconv have to be added to the project.

Better explanations : http://www.google.com/url?sa=D&q=http://code.google.com/p/zxing/source/browse/trunk/iphone/README%3Fspec%3Dsvn1651%26r%3D1651

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文