2012-01-04 105 views
14

Xcode給了我以下錯誤,我真的不知道該怎麼辦,正在讓我瘋狂。 我正在導入一個OpenCV框架,所以也許問題出在那裏或者與編譯器有關。 任何人都可以告訴我該怎麼做或搜索? 謝謝。未知的錯誤編譯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 
+0

你是如何導入框架的? – Mark 2012-01-04 10:15:16

+5

這是**不** ** **編譯錯誤**它是**鏈接錯誤**鏈接器告訴你它不能鏈接到你正在使用的一些符號名稱。檢查庫路徑等 – 2012-01-04 10:17:19

+0

協議鏈接器錯誤不是編譯器。 quartz.lib? – 2012-01-04 10:37:26

回答

21

只是爲了未來的訪客(像我一樣;-))的緣故,我報告古斯塔沃自答案:

添加 「ImageIO.framework」 到 「鏈接的框架和Library