【发布时间】:2012-02-02 06:00:18
【问题描述】:
Xcode 给了我以下错误,我真的不知道该怎么办,这让我发疯了。 我正在导入一个 OpenCV 框架,所以问题可能存在或与编译器有关。 谁能告诉我要做什么或搜索什么?
Undefined symbols: "_CGImageDestinationCreateWithURL", referenced from:
cv::ImageIOEncoder::write(cv::Mat const&, std::vector<int, std::allocator<int> > const&)in OpenCV(grfmt_imageio.o) "_CGImageDestinationAddImage", referenced from:
cv::ImageIOEncoder::write(cv::Mat const&, std::vector<int, std::allocator<int> > const&)in OpenCV(grfmt_imageio.o) "_CGImageSourceCreateImageAtIndex", referenced from:
cv::ImageIODecoder::readHeader() in OpenCV(grfmt_imageio.o) "_CGImageDestinationFinalize", referenced from:
cv::ImageIOEncoder::write(cv::Mat const&, std::vector<int, std::allocator<int> > const&)in OpenCV(grfmt_imageio.o) "_CGImageSourceCreateWithURL", referenced from:
cv::ImageIODecoder::readHeader() in OpenCV(grfmt_imageio.o) ld: symbol(s) not found collect2: ld returned 1 exit status
【问题讨论】:
-
你是如何导入框架的?
-
这不是 编译错误它是链接错误链接器告诉你它不能链接到某个符号您正在使用的名称。检查库路径等。
-
同意的链接器错误不是编译器。石英.lib?
-
好的,我解决了这个问题,我尝试导入的库有一些依赖项,所以我只导入库,一切正常。
-
更多信息是“ImageIO.framework”