[英]Error C1083 Cannot open include file: 'opencv2\opencv.hpp' in VS 2015
I am trying to run the simple test code below on Visual Studio 2015 with OpenCv 3.1 on windows 10. 我正在尝试在Windows 10上使用OpenCv 3.1在Visual Studio 2015上运行以下简单测试代码。
#include <opencv2\opencv.hpp>
using namespace cv;
int main()
{
namedWindow("win");
waitKey(0);
return 1;
}
But i get 但是我明白了
Error C1083 Cannot open include file: 'opencv2\\opencv.hpp': No such file or directory
错误C1083无法打开包含文件:'opencv2 \\ opencv.hpp':没有这样的文件或目录
I have added the Path C: \\ opencv \\ build \\ x64 \\ vc14 \\ bin
to System variable in the Windows Environment variables. 我已将路径
C: \\ opencv \\ build \\ x64 \\ vc14 \\ bin
到Windows环境变量中的系统变量中。
Also in Visual studio I have set the Include Directories C:\\opencv\\build\\include;$(IncludePath)
under Project properties > VC++ Directories
and also the Linker > Input Additional Dependencies
set to opencv_world310d.lib
(Debug) 同样在Visual Studio中,我在
Project properties > VC++ Directories
下设置了包含目录C:\\opencv\\build\\include;$(IncludePath)
,并且还将Linker > Input Additional Dependencies
设置为opencv_world310d.lib
(调试)
I also have the following setting: 我也有以下设置:
Executable Directories - C:\\opencv\\build\\x64\\vc14
可执行目录
C:\\opencv\\build\\x64\\vc14
Library Directories - C:\\opencv\\build\\x64\\vc14\\lib
库目录
C:\\opencv\\build\\x64\\vc14\\lib
Additional Library Directories - C:\\opencv\\build\\x64\\vc14\\lib
附加库目录
C:\\opencv\\build\\x64\\vc14\\lib
Please help me resolve this error. 请帮助我解决此错误。
我终于找到了解决方案,在“项目”>“属性”中,我必须将平台更改为x64并再次设置bin,lib和include文件夹
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.