我在我的应用程序中使用zxing
lib OS X
。我已经包含zxing-objc
在我的项目中,并且只是将 zxing demo ( ) 中的代码复制粘贴zxing-root/objc/examples/demo
到单独的ViewController
类中。尝试编译项目时,出现以下链接器错误:
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_QTCaptureDevice", referenced from:
objc-class-ref in ScanViewController.o
"_OBJC_CLASS_$_ZXCapture", referenced from:
objc-class-ref in ScanViewController.o
"_QTMediaTypeMuxed", referenced from:
-[ScanViewController performVideoSourceScan] in ScanViewController.o
"_QTMediaTypeVideo", referenced from:
-[ScanViewController performVideoSourceScan] in ScanViewController.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
我已经仔细检查了所有代码,并将我的项目属性(包括 c++ 编译器选项)与演示项目属性进行了比较,一切正常。