Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PhoneGap and Zxing QrCode - building issues

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

like image 780
craymond Avatar asked Jan 27 '11 14:01

craymond


1 Answers

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

like image 62
Grady Player Avatar answered Oct 16 '22 20:10

Grady Player