我需要将#import“ZBarSDK.h”写入#ifdef OBJ 部分,因为如果在其他地方导入,Minizip不起作用!
#ifdef __OBJC__
#import <UIKit/UIKit.h>
#import <Foundation/Foundation.h>
#import "ZBarSDK.h"
#endif
然后我收到一个错误:
Undefined symbols for architecture armv7:
"_OBJC_CLASS_$_ZBarReaderViewController", referenced from:
objc-class-ref in ViewController.o
"_ZBarReaderControllerResults", referenced from:
-[ViewController imagePickerController:didFinishPickingMediaWithInfo:] in ViewController.o
"_OBJC_CLASS_$_CIImage", referenced from:
objc-class-ref in ImageViewController.o
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
任何人都可以帮忙吗?
myr0
答案 0 :(得分:2)
前两个消息的原因可能是'ZBarSDK'提供的静态库(ZBarSDK.a)仅包含ARMv6代码(或者可能是Intel i386)。您需要下载提供ARMv7目标代码的更新版本,或者下载其源代码并自行编译。
第3个错误来自于您尚未将CoreImage框架添加到项目中。