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
最佳答案
为了将来的访客(像我一样;-)),我报告了 Gustavo 的 self 回答:
添加 "ImageIO.framework" 至 "链接的框架和库"
关于c++ - 编译opencv框架的未知错误: Undefined symbols: "_CGImageDestinationCreateWithURL",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8725100/