【发布时间】:2013-01-16 10:35:16
【问题描述】:
我在构建项目时遇到以下错误,
Fatal error C1083: Cannot open include file: 'opencv2/core/core_c.h: No such file or directory Similarly for highgui.
因为我已经安装了 OpenCV2.4.3,它的路径是 C:\opencv。我还在 include 目录
中添加了这些行 C:opencv\include\opencv
C:opencv\include\opencv2
C:\opencv\include
源代码是:
// #include "stdafx.h"
#include "cv.h"
#include "highgui.h"
int main()
{
IplImage* img = cvLoadImage("C:\\prado.jpg",1);
cvNamedWindow( "test", CV_WINDOW_AUTOSIZE );
cvShowImage( "test", img );
cvWaitKey(0);
cvReleaseImage( &img );
return 0;
} 对我来说一切都很好。我已经在发布模式下删除了所有内容。我只是在尝试调试模式。
我所做的 Open CV 的配置是:
库文件
【问题讨论】:
-
尝试阅读
How to build applications with OpenCV inside the Microsoft Visual Studiodocs.opencv.org/doc/tutorials/introduction/…