0

我在我的项目中包含了 libzar.a,但是,即使我没有编写任何代码来引用 libzar 中的任何方法,我的项目仍然无法链接。这是错误输出,

Undefined symbols for architecture i386:

“_CVPixelBufferGetBaseAddressOfPlane”,引用自:-[ZBarCVImage convertCVtoRGB] in libxxx.a(ZBarCVImage.o)

“_CVPixelBufferGetBytesPerRowOfPlane”,引用自:-[ZBarCVImage convertCVtoRGB] in libxxx.a(ZBarCVImage.o)

“_CVPixelBufferGetHeight”,引用自:-[ZBarCVImage convertCVtoRGB] in libxxx.a(ZBarCVImage.o)

“_CVPixelBufferGetWidth”,引用自:-[ZBarCVImage convertCVtoRGB] in libxxx.a(ZBarCVImage.o)

“_CVPixelBufferLockBaseAddress”,引用自:-[ZBarCVImage convertCVtoRGB] in libxxx.a(ZBarCVImage.o)

“_CVPixelBufferRelease”,引用自:-[ZBarCVImage setPixelBuffer:] in libxxx.a(ZBarCVImage.o)

“_CVPixelBufferRetain”,引用自:-[ZBarCVImage setPixelBuffer:] in libxxx.a(ZBarCVImage.o)

“_CVPixelBufferUnlockBaseAddress”,引用自:-[ZBarCVImage convertCVtoRGB] in libxxx.a(ZBarCVImage.o)

“_iconv”,引用自:libxxx.a(qrdectxt.o) 中的 _qr_code_data_list_extract_text

“_iconv_close”,引用自:libxxx.a(qrdectxt.o) 中的 _qr_code_data_list_extract_text

“_iconv_open”,引用自:libxxx.a(qrdectxt.o) 中的 _qr_code_data_list_extract_text

ld:未找到体系结构 i386 的符号 clang:错误:链接器命令失败,退出代码为 1(使用 -v 查看调用)

这就是我所做的,
1. 刚刚将 libzar.a 添加到我的项目中
2. 构建应用程序
3. 错误

我的链接配置只添加了 -all_load 和 -ObjC 选项。传统上,如果我从不引用静态库中的任何代码,就永远不会出现这种链接错误。我错过了什么吗?

4

1 回答 1

3

将 CoreVideo.framework 添加到“使用库链接二进制文件”构建阶段应该可以解决这个问题。

于 2013-08-04T05:51:03.283 回答