变量具有不完整类型'CvCapture'

时间:2014-08-03 19:05:13

标签: c++ ios xcode opencv

我对Xcode很新,所以如果这是一个非常简单的问题我会道歉。我试图让OpenCV Xcode示例代码进行编译和运行,但我遇到了很多错误。第一个问题都是关于定位文件所以我改变了路径来解决这个问题。不幸的是,在解决了那些现在又有一个我不知道如何修复的问题之后。代码行:

CvCapture pCapture = 0;

产生错误,"变量类型不完整' CvCapture'。" 我已经确定了CcCapture的定义,所以我不确定问题是什么。我目前正在使用Xcode 4.6。如果您对Xcode或OpenCV有任何经验并知道如何解决这个问题,我将非常感激!

1 个答案:

答案 0 :(得分:1)

你可能想要:

CvCapture* pCapture = 0;

,因为

typedef struct CvCapture CvCapture;
The structure CvCapture does not have public interface and is used only
as a parameter for video capturing functions.

http://www.ai.rug.nl/vakinformatie/pas/content/Highgui/opencvref_highgui.htm#highgui_video

相关问题