编译opencv框架的未知错误:未定义的符号:"_ CGImageDestinationCreateWithURL"

Gus*_*avo 14 c++ xcode gcc opencv

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
Run Code Online (Sandbox Code Playgroud)

Gio*_*lzo 21

为了未来的访客(像我;-)),我报告古斯塔沃的自我回答:

将" ImageIO.framework " 添加到" 链接的框架和库 "