Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unknown error compiling opencv framework: Undefined symbols: "_CGImageDestinationCreateWithURL"

Xcode is giving me the following error, I don't really know what to do, is driving my crazy. I'm importing an OpenCV framework so maybe the problem is there or something related to the compiler. Could anyone tell me what to do or search for?

      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
like image 449
Gustavo Avatar asked Jan 04 '12 10:01

Gustavo


1 Answers

Just for sake of future visitors (like me ;-)), I report the Gustavo self-answer:

Add "ImageIO.framework" to "Linked Frameworks and Library"

like image 150
Giordano Scalzo Avatar answered Nov 03 '22 14:11

Giordano Scalzo