PhoneGap 和 Zxing QrCode - 构建问题
我目前在安装 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 添加到项目中。
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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
解决方案,由 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