配置OpenCV产生flann\logger.h(66): error C4996: 'fopen': This function or variable may be unsafe问题[zz]

使用vs2012/2013配置opencv编译出现问题:

1>------ 已启动生成: 项目: Win32ForOpenCV245, 配置: Debug Win32 ------

1>  stdafx.cpp
1>  Win32ForOpenCV245.cpp
1>f:\softs\opencv245\opencv\build\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”的声明
========== 生成: 成功 0 个,失败 1 个,最新 0 个,跳过 0 个 ==========

解决办法它也写的很清楚,这里截图给大家看

也就是加入一个_CRT_SECURE_NO_WARNINGS的问题。

这个问题只有在Visual Studio 2012中才会有,2010中只是一个warning。

这个问题不管在OpenCV2.4.4还是OpenCV2.4.5都有,其它版本可能也有。

配置OpenCV产生flann\logger.h(66): error C4996: 'fopen': This function or variable may be unsafe问题[zz]

时间: 2024-10-10 07:26:15

配置OpenCV产生flann\logger.h(66): error C4996: 'fopen': This function or variable may be unsafe问题[zz]的相关文章

opencv2\flann\logger.h(66): error C4996: 'fopen' 解决方法

Visual Studio 使用opencvc出现以下错误: \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

vs2015 error c4996: 'fopen': This function or variable may be unsafe

使用vs2015打开图片,遇到如下错误. 1>------ 已启动生成: 项目: ImageScale3, 配置: Debug Win32 ------1> ImageScale3Dlg.cpp1>d:\program files (x86)\opencv2.4.13\opencv\build\include\opencv2\flann\logger.h(66): error C4996: 'fopen': This function or variable may be unsafe.

error C4996: 'fopen': This function or variable may be unsafe.

vs2013中错误提示信息: 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>f:\program files (x86)\microsoft visual studio 12.0\vc\i

error C4996: 'fopen': This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation

遇到这个问题,请打开项目的Properties(属性)------->Configuration Properties(配置属性)------>C/C++ ------>Preprocessor(预处理器)------->Preprocessor Difinitions (预处理器定义)   添加   _CRT_SECURE_NO_WARNINGS     之后点击OK.最后   应用------>确定. error C4996: 'fopen': This function

【Visual Studio】error c4996: 'fopen': This function or variable may be unsafe(转)

原文转自 http://blog.csdn.net/zhangyuehuan/article/details/12012635 [解决方案]项目 =>属性 =>c/c++  =>预处理器=>点击预处理器定义,编辑,加入_CRT_SECURE_NO_WARNINGS,即可. [Visual Studio]error c4996: 'fopen': This function or variable may be unsafe(转)

vs2013 error c4996: 'fopen': This function or variable may be unsafe

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 解决方案,项目 =>属性 =>c/c++  =>预处理器=>点击预处理器定义,编辑,加入_CRT_SECURE_NO_WARNINGS

(转:)Visual Studio 2012 编译错误【error C4996: 'scanf': This function or variable may be unsafe. 】的解决方案

在VS 2012 中编译 C 语言项目,如果使用了 scanf 函数,编译时便会提示如下错误: error C4996: 'scanf': This function or variable may be unsafe. Consider using scanf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. 原因是Visual C++ 2012 使用了更加安

[转]Visual Studio 2012 编译错误【error C4996: 'scanf': This function or variable may be unsafe. 】的解决方案

原文地址:http://www.cnblogs.com/gb2013/archive/2013/03/05/SecurityEnhancementsInTheCRT.html 在VS 2012 中编译 C 语言项目,如果使用了 scanf 函数,编译时便会提示如下错误: error C4996: 'scanf': This function or variable may be unsafe. Consider using scanf_s instead. To disable deprecat

Visual Studio 2012 编译错误【error C4996: 'scanf': This function or variable may be unsafe. 】的解决方案(转载)

转载:http://www.th7.cn/Program/c/201303/127343.shtml 原因是Visual C++ 2012 使用了更加安全的 run-time library routines .新的Security CRT functions(就是那些带有“_s”后缀的函数),请参见: <CRT函数的安全增强的版本> 下面给出这个问题的解决方案: 方法一:将原来的旧函数替换成新的 Security CRT functions. 方法二:用以下方法屏蔽这个警告: 1. 在预编译