原因:
opencv的命名空间using namespace cv
和
windows.h中ACCESS_MASK定义冲突。
解决方案:
1、注释掉所有的using namespace cv,然后在需要的地方写上cv::(已试过,没有效果)。
2、找到添加了#include <windows.h>的头文件:xxx.h,或者,包含有 windows.h的库文件,比如我的xxx.h中存在:#include <amp.h>,
把该windows.h或者 amp.h放在对于xxx.cpp中进行include。即可解决