【问题标题】:opencv framework with opengles trows error?带有opengles trows错误的opencv框架?
【发布时间】:2013-02-18 03:19:47
【问题描述】:

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

添加框架后,我将文件更改为 .mm 并且编译良好。当我添加“cv::Mat 变量”时,问题就来了。我收到以下错误。这是什么原因?

以下是我添加“cv::Mat 变量”时遇到的错误。

  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

【问题讨论】:

  • 我已经用 iPhone SDK 完成了 openCV 的工作,如果你分享你的源代码会有所帮助。
  • 代码我已经分享了链接。。我的第一个链接是代码。
  • openGL 代码运行良好,我想要你合并后的源代码。
  • @Will 感谢您的回复。我在“OpenGLView.mm”中添加了“cv:: Mat name”我的代码就是这样..
  • 好的,你的问题是你没有正确添加openCV框架,你必须正确放置正确的标题路径和必要的东西。

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


【解决方案1】:

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

AVFoundation.framework
ImageIO.framework
libz.dylib

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

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-07-31
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多