简体   繁体   English

带有opengles的opencv框架引发错误?

[英]opencv framework with opengles trows error?

I tried running a basic opengl program from this link . 我尝试从此链接运行基本的opengl程序。 I can run it successfully. 我可以成功运行它。 Now I need some functionalities of opencv to be added in this. 现在,我需要在其中添加一些opencv功能。 So I added opencv framework from this link . 因此,我从此链接添加了opencv框架。

After adding the framework I changed the files to .mm and its compiling good. 添加框架后,我将文件更改为.mm及其编译良好。 The problem comes when I add "cv::Mat Variable". 当我添加“ cv :: Mat Variable”时,问题就来了。 I get the below error. 我收到以下错误。 What would be the reason for this? 这是什么原因呢?

The below is the error I get When I add "cv::Mat Variable". 以下是我添加“ 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

This Solves my problem. 这解决了我的问题。 To add add opencv library file 添加添加opencv库文件

AVFoundation.framework AVFoundation.framework
ImageIO.framework ImageIO.framework
libz.dylib libz.dylib

should be added. 应该添加。 And this link explains clearly about this. 并且此链接对此进行了清晰的解释。 http://aptogo.co.uk/2011/09/opencv-framework-for-ios/ http://aptogo.co.uk/2011/09/opencv-framework-for-ios/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM