我尝试从此链接运行一个基本的 opengl 程序。我可以成功运行它。现在我需要在其中添加一些opencv的功能。所以我从这个链接添加了 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