在编译命令行中添加 /D_SCL_SECURE_NO_DEPRECATE
问题:Add the option /D_SCL_SECURE_NO_DEPRECATE to the compilation command
解决方案:项目属性 –> 配置属性 –> C/C++ –> 命令行 –> 加上 /D_SCL_SECURE_NO_DEPRECATE
参考:
These are compilation options that I typically enable for any C++ projects in Visual Studio. They should go in the project's property settings, underConfiguration Properties->C/C++->Command Line, in the Additional optionstextbox. They are listed here exactly as they should be entered in that box (equal signs and all).
/MP : This enables multi-process compilation, which can provide a significant speed boost on the multi-core processor you likely have in your development (or build) machine. As the MSDN documentation states, it is not compatible with the Enable Minimal Rebuild option, which, depending on the situation, may negate any performance advantage this switch has. Disabling minimal rebuild is not as bad as it sounds1 and in my projects I've found that using/MP confers a significant improvement in compilation time. You definitely want to enable it for Release builds, at least. Reference.
/D_CRT_SECURE_NO_WARNINGS : This switch disables the warnings that Visual Studio spits out if you use any of the C RunTime functions that Microsoft has provided secure replacements for (such as strncpy). This isn't necessarily a bad idea, but their safe functions are not part of the standard and are thus non-portable. Reference.
/D_SCL_SECURE_NO_WARNINGS : Just like the switch above, only for the Standard C++ Library (anything in the std namespace). Reference.
/D_SECURE_SCL=0 : Disables checked iterators. Disabling this feature can improve performance when using iterators, at the expense of less protection against unsafe iterator use. Generally there isn't too much of a performance difference (a Visual C++ lead states that they measured about a 6% difference in this feedback / bug page) so it may be worth leaving it on most of the time. Reference.
Note that /D_CRT_SECURE_NO_WARNINGS and /D_SCL_SECURE_NO_WARNINGS are/D_CRT_SECURE_NO_DEPRECATE and /D_SCL_SECURE_NO_DEPRECATE, respectively, in versions prior to Visual Studio 2008.
Disabling Minimal Rebuild does not mean that the whole project gets rebuilt every time, just that Visual Studio uses a "was this .cpp/.h modified?" approach instead of trying to determine if the exact changes you made warrant a recompile. ↩
在编译命令行中添加 /D_SCL_SECURE_NO_DEPRECATE的更多相关文章
- 【转帖】windows命令行中java和javac、javap使用详解(java编译命令)
windows命令行中java和javac.javap使用详解(java编译命令) 更新时间:2014年03月23日 11:53:15 作者: 我要评论 http://www.jb51.ne ...
- 如何在cmd命令行中查看、修改、删除与添加环境变量,语法格式例子:set path;echo %APPDATA%
如何在cmd命令行中查看.修改.删除与添加环境变量 首先明确一点: 所有的在cmd命令行下对环境变量的修改只对当前窗口有效,不是永久性的修改.也就是说当关闭此cmd命令行窗口后,将不再起作用.永久性修 ...
- 在命令行中运行eclipse中创建的java项目
在命令行中运行eclipse中创建的java项目 博客分类: java相关 javaeclipse命令行 由于项目要求,需要对eclipse中的项目进行打包,似的可以在客户机上不装eclipse的情 ...
- DOS命令行中的双引号
在DOS命令窗口下,运行C:\Program Files\WinRAR\WinRAR.exe,提示如下错误: 因为C:\Program Files\WinRAR\WinRAR.exe中含有空格,它被分 ...
- 在 Linux 命令行中使用和执行 PHP 代码
PHP是一个开源服务器端脚本语言,最初这三个字母代表的是“Personal Home Page”,而现在则代表的是“PHP:Hypertext Preprocessor”,它是个递归首字母缩写.它是一 ...
- 命令行中的 vi 模式
命令行中修改已经输入的命令比较麻烦,如果你不知道一些快捷键的话,只能使用方向键一个一个字符地移动到目标位置进行修改,对于比较复杂且过长的命令来说,效率不高. 以下信息来自 bash 的 man 页面: ...
- 在 Linux/windows下 命令行中使用和执行 PHP 代码[交互式php]
[注释]在ubuntu下,升级php到7.1版本,虽然提示的是Interactive mode enabled, 但实际上可以直接书写命令,和interactive shell效果一样. 一:wind ...
- 在命令行中直接运行带main方法的java
用了很久的java,基本都是交给服务器完成的执行,有page之类的入口,或者是在IDE工具中直接 Run As Java Application. 并且一直对安装java之后配置JAVA_HOME,p ...
- Windows10 命令行中使用网络驱动器
Windows10中,我们在局域网内使用共享文件夹,建立映射的网络驱动器,有时候需要一些软件去调用网络驱动器内的资源,但是发现在资源管理器能正常打开,应用软件却无法识别,命令行中提示:“系统找不到指定 ...
随机推荐
- jsp中iframe填充装个页面
首先要引入这个css,由于我之前没有引入这个,导致iframe的高度一只是默认高度,没有改变 <style type="text/css"> body, html { ...
- <<< tomcat启动报错StandardServer.await: create[8005]
启动tomcat的时候出现异常 严重: StandardServer.await: create[8005]: java.net.BindException: Address already in u ...
- MySQL中日期与时间类型
http://blog.sina.com.cn/s/blog_4d8730df01014jiy.html
- Win7---------专区
待完善中-------------------------------------- 1.0Win7来历: 不算上最早的Windows版本从 95 98 2000 ME XP 2003 Vis ...
- Web jquery表格组件 JQGrid 的使用 - 11.问题研究
系列索引 Web jquery表格组件 JQGrid 的使用 - 从入门到精通 开篇及索引 Web jquery表格组件 JQGrid 的使用 - 4.JQGrid参数.ColModel API.事件 ...
- [Unity3d]调试问题之UI/Image不显示
问题描述 在项目中添加的UI/Image资源,在PC和通过Unity Remove测试都没有问题: PC上的效果 手机上Unity Remove测试结果 可真正发布到手机上运行则如下显示,说明imag ...
- 多光谱图像数据库, Multispectral images databses
1. https://scien.stanford.edu/index.php/hyperspectral-image-data/ 2. http://www.cs.columbia.edu/CAVE ...
- jquery-easyui 树的使用笔记
通常还是使用jquery-ui, 它是完全免费的, jquery-easyui可以使用 freeware edition. 但easyui还不是完全免费的: 它是基于jquery, 但是第三方开发的, ...
- Androidstudio报错UnsupportedClassVersionError
报错信息 Error:java.lang.UnsupportedClassVersionError: com/android/dx/command/Main : Unsupported major.m ...
- Angular-Chart.js 初接触;;;
可以先看下下面的链接,了解下, 推荐链接 准备工作 JS文件{angular.js.Chart.js.angular-chart.js} 这3个文件我的获取难易程度:Chart.js > ang ...