opencv框架与opengles trows错误?

时间:2013-03-04 04:49:08

标签: iphone ios objective-c opencv opengl-es

我尝试从this link运行一个基本的opengl程序。我可以成功运行它。现在我需要在其中添加一些opencv功能。 所以我从this link添加了opencv框架。

添加框架后,我将文件更改为.mm及其编译好。当我添加“cv :: Mat Variable”时会出现问题。我得到以下错误。这是什么原因?

以下是我收到的错误当我添加“cv :: Mat Variable”时。

  Undefined symbols for architecture i386:
  "_gzclose", referenced from:
      _cvReleaseFileStorage in OpenCV(persistence.o)
      _cvOpenFileStorage in OpenCV(persistence.o)
  "_gzeof", referenced from:
      icvEof(CvFileStorage*)      in OpenCV(persistence.o)
  "_gzgets", referenced from:
      icvGets(CvFileStorage*, char*, int)in OpenCV(persistence.o)
  "_gzopen", referenced from:
      _cvOpenFileStorage in OpenCV(persistence.o)
  "_gzputs", referenced from:
      icvPuts(CvFileStorage*, char const*)in OpenCV(persistence.o)
  "_gzrewind", referenced from:
      _cvOpenFileStorage in OpenCV(persistence.o)
ld: symbol(s) not found for architecture i386
collect2: ld returned 1 exit status

1 个答案:

答案 0 :(得分:1)

这解决了我的问题。添加添加opencv库文件

AVFoundation.framework
ImageIO.framework
libz.dylib

应该添加。这个链接清楚地解释了这一点。 http://aptogo.co.uk/2011/09/opencv-framework-for-ios/