Reputation: 28
I am building an iPhone app using ZXingWidget. I followed the README instructions and got everything setup in my project and it compiled with no problem. I then imported QRCodeReader.h in my view controller header file and started to get the following error on compilation of FormatReader.h:
Lexical or Preprocessor issue 'zxing/common/Counted.h' file not found.
I realized I had forgotten to rename my view controller implementation file from .m to .mm so I did that. However, I am still getting the error.
Any suggestions?
EDIT: Here is the directory layout for my "QR Scan" project. You will see that "cpp" is under the "Projects" folder and that "QR Scan.xcodeproj" is in the "QR Scan" folder. I have "../cpp/core/src" in my headers for my QR Scan Xcode project.
/Projects
/cpp
/core
/src
/QR Scan
/QR Scan
/ZXingWidget
ZXingWidget.xcodeproj
QR Scan.xcodeproj
Upvotes: 0
Views: 3839
Reputation: 11
I had to spend lot of time fixing this problem. Even after change the file extension to .mm, the problem still showed up. The problem was because of the import statement. Try placing the #import "ZXingWidgetController.h" in your .h (header file) and #import "QRCodeReader.h" in your .m(implementation file). This really solved my problem in XCode 4.2. hope this helps someone.
Upvotes: 1