gpt4 book ai didi

c++ - 编译opencv框架的未知错误: Undefined symbols: "_CGImageDestinationCreateWithURL"

转载 作者:IT老高 更新时间:2023-10-28 22:36:31 24 4
gpt4 key购买 nike

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/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com