opencv|opencv 报错(fatal error C1083: 无法打开包括文件: “stdafx.h”: No such file or directory)

1、报错
“ 无法打开包括文件: “stdafx.h”: No such file or directory ”
这里的错误是,你包含了头文件 #include “stdafx.h” 产生所产生的,大概你是创建的空项目,却包含了这个头文件。
【opencv|opencv 报错(fatal error C1083: 无法打开包括文件: “stdafx.h”: No such file or directory)】2、解决办法
办法一
将头文件替换掉(建议此种做法,较简单);查看 “stdafx.h” 所包含的内容为:
#include
#include
1
2
这里只需将你的 ,#include “stdafx.h” 删除掉。更换为 其所包含的内容。也就是:
#include
#include
1
2
办法二:
在你项目中,找到头文件,添加头文件,名为:stdafx.h :添加成功后,单击并添加内容:
#include
#include
1
2
保存,再行编译,错误解决~ 作者:Eddy_zheng
来源:CSDN
原文:https://blog.csdn.net/Eddy_zheng/article/details/49976095
版权声明:本文为博主原创文章,转载请附上博文链接!

    推荐阅读