初入职常见问题:在visual studio 2012 2013 2015 上编译报错内容包含“use _CRT_SECURE_NO_WARNINGS“的字眼

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/qq_33249383/article/details/84997937

错误类似:

1>  LoadPicture.cpp

1>d:\opencv\opencv\build\x86\vc11\include\opencv2\flann\logger.h(66): error C4996: 'fopen': This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.

1>          c:\program files (x86)\microsoft visual studio 11.0\vc\include\stdio.h(218) : 参见“fopen”的声明

解决办法如下:

找到Debug属性页C/C++下得预处理器

在预处理定义的

WIN32

_WINDOWS

_DEBUG下添加_CRT_SECURE_NO_WARNINGS

猜你喜欢

转载自blog.csdn.net/qq_33249383/article/details/84997937