iphone - opencv框架与opengles trows错误?

标签 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

最佳答案

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

AVFoundation.framework
ImageIO.framework
libz.dylib

应添加

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

关于iphone - opencv框架与opengles trows错误?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15194741/

相关文章:

objective-c - 在 UINavigationViewController 的 Root View 中隐藏导航栏,但在其他 View 中显示

iphone - 秒表 - NSTimer 或 NSDate

iphone - 如何从委托(delegate)外部设置 super View ?

ios - UIView.animateWithDuration 不是动画 Swift(再次)

ios - 函数返回后调用转义闭包是什么意思?

iOS 二分搜索代码在超过 256 项时崩溃

iOS:在具有特殊字符编码的标签中显示 NSStrings 的 NSArray

iphone - 向 UILabel 添加背景图像

iphone - iOS CoreData批量插入?

ios - 无法将特定的CGColor应用于CGContextSetFillColor