xcode PhoneGap 和 Zxing QrCode - 构建问题

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/4817774/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-14 20:08:47  来源:igfitidea点击:

PhoneGap and Zxing QrCode - building issues

iphonexcodecordovaqr-codezxing

提问by craymond

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 :

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

  • 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
  • 路径/项目/插件/BarcodeScanner.mm:8:0 在路径/项目/插件/BarcodeScanner.mm 包含的文件中
  • 路径/项目/插件/BarcodeScanner.h:11:0 在路径/项目/插件/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 中没有这样的文件或目录

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.

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

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.

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

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

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

回答by Grady Player

SOLUTIONas posted by craymond.

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.

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

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

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