Cannot open include file: 'opencv2/core/core_c.h': No such file or directory .

在vs2012调试的时候出现了该错误:

opencv-2.4.5\opencv\include\opencv2\opencv.hpp(46) : fatal error C1083: Cannot open include file: 'opencv2/core/core_c.h': No such file or directory

 

是因为我在vc++目录里的包含目录添加加include的路径时加错了。 

应该加以下三个路径:

..\opencv-2.4.6.0\opencv\build\include

..\opencv-2.4.6.0\opencv\build\include\opencv

..\opencv-2.4.6.0\opencv\build\include\opencv2

切记,而不是

..\opencv-2.4.6.0\opencv\include
..\opencv-2.4.6.0\opencv\include\opencv
..\opencv-2.4.6.0\opencv\include\opencv2

网上的很多文档里添加的路径都是opencv里的include,导致出错,在这里大家要谨记。

你可能感兴趣的:(Cannot open include file: 'opencv2/core/core_c.h': No such file or directory .)