简体   繁体   中英

opencv framework with opengles trows error?

I tried running a basic opengl program from this link . I can run it successfully. Now I need some functionalities of opencv to be added in this. So I added opencv framework from this link .

After adding the framework I changed the files to .mm and its compiling good. The problem comes when I add "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".

  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

AVFoundation.framework
ImageIO.framework
libz.dylib

should be added. And this link explains clearly about this. http://aptogo.co.uk/2011/09/opencv-framework-for-ios/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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