visual-studio-2008 - Visual Studio 2008 中包含文件 core 和 highgui 时出错

标签 visual-studio-2008 opencv

当我构建项目时,出现以下错误,

   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。我还在包含目录中添加了这些行

  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;

} 我觉得一切都很好。我已经在 Release模式下删除了所有内容。我仅尝试 Debug模式。


我所做的 Open CV 配置是: include files

库文件

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

最佳答案

这就是我所做的,效果很好:

在包含文件中包含以下路径:

  1. opencv\modules\core\include\opencv2\core
  2. opencv\include\opencv2
  3. opencv\include\opencv
  4. opencv\build\include

在库文件中包含以下路径;

  1. opencv\build\x86\vc9\lib

关于visual-studio-2008 - Visual Studio 2008 中包含文件 core 和 highgui 时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14356356/

相关文章:

vb.net - VB Xml 文字中的 IntelliSense

c# - 如何在 C# 中禁用隐式 "this"?

python - cv2.videoCapture() 总是返回 false,也是 skvideo.io.VideoCapture()

c# - 将子类转换为继承类

visual-studio-2008 - 跨标签组移动标签的 VS2008 快捷方式

C#- Microsoft.Office.Interop.Excel 将 excel 中的所有行复制到另一个工作表

c++ - C++ 中 vector 下标超出范围

python-2.7 - cv2.destroyWindow() 没有按预期工作

c++ - 向 node.js 添加 OpenCV C++ 附加组件的最基本示例

java - java中Mat>OpenCv中的put(int,int,int)方法