首页 > Web开发 > 详细

PHP扩展开发(6) - VS2012下strncasecmp和fopen函数warning

时间:2016-03-23 16:44:39      阅读:185      评论:0      收藏:0      [点我收藏+]

1. fopen
 

warning 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 12.0\VC\include\stdio.h(211) : see declaration of ‘fopen‘

 
解决方法:
 
加宏      _CRT_SECURE_NO_WARNINGS
 
右键项目 -> 属性 -> 预处理(Preprocessor) -> 预处理定义(Preprocessor Definitions) -> 把宏加进去
 
 
 
2. strncasecmp、strnicmp
 
 ‘strnicmp‘: The POSIX name for this item is deprecated. Instead, use the ISO C++ conformant name: _strnicmp. See online help for details.
1>          C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\string.h(255) : see declaration of ‘strnicmp‘
 
解决方法:
 
加宏
_CRT_SECURE_NO_DEPRECATE=1
_CRT_NONSTDC_NO_DEPRECATE=1
 
右键项目 -> 属性 -> 预处理(Preprocessor) -> 预处理定义(Preprocessor Definitions) -> 把宏加进去 

PHP扩展开发(6) - VS2012下strncasecmp和fopen函数warning

原文:http://www.cnblogs.com/imarno/p/5311494.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!