开发者

Zxing compiles for device fine, but fails in simulator

I have downloaded the latest zxing library via SVN, then integrated according to README file. I was able to integrate, compile and test on device. However, when compiling in the simulator I get:

Missing required architecture i386 in file
"_OBJC_CLASS_$_ZXingWidgetController", referenced from:
objc-class-ref-to-ZXingWidgetController in ScannerViewController.o

and

 error: 'AVCaptureDevice' undeclared (first use in this function)

I have attempted to "weak" link (optional in Xcode 4) the AVFoundation library to fix the second error but no dice.

Anyone know why this would occur? A search seems 开发者_JS百科to pull up the opposite problem, failing on device but succeeding in simulator. Very weird.

Edit:

One more thing I forgot to mention is I have tried to delete the build folders and simulator, then trying to rebuild. Same errors occur.


After revisiting this project to update for iOS5, the following solution fixed this.

Swap out the compiler to LLVM GCC 4.2 for the ZXing.xcodeproj.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜