问题: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的更多相关文章

  1. 【转帖】windows命令行中java和javac、javap使用详解(java编译命令)

    windows命令行中java和javac.javap使用详解(java编译命令) 更新时间:2014年03月23日 11:53:15   作者:    我要评论 http://www.jb51.ne ...

  2. 如何在cmd命令行中查看、修改、删除与添加环境变量,语法格式例子:set path;echo %APPDATA%

    如何在cmd命令行中查看.修改.删除与添加环境变量 首先明确一点: 所有的在cmd命令行下对环境变量的修改只对当前窗口有效,不是永久性的修改.也就是说当关闭此cmd命令行窗口后,将不再起作用.永久性修 ...

  3. 在命令行中运行eclipse中创建的java项目

    在命令行中运行eclipse中创建的java项目 博客分类: java相关 javaeclipse命令行  由于项目要求,需要对eclipse中的项目进行打包,似的可以在客户机上不装eclipse的情 ...

  4. DOS命令行中的双引号

    在DOS命令窗口下,运行C:\Program Files\WinRAR\WinRAR.exe,提示如下错误: 因为C:\Program Files\WinRAR\WinRAR.exe中含有空格,它被分 ...

  5. 在 Linux 命令行中使用和执行 PHP 代码

    PHP是一个开源服务器端脚本语言,最初这三个字母代表的是“Personal Home Page”,而现在则代表的是“PHP:Hypertext Preprocessor”,它是个递归首字母缩写.它是一 ...

  6. 命令行中的 vi 模式

    命令行中修改已经输入的命令比较麻烦,如果你不知道一些快捷键的话,只能使用方向键一个一个字符地移动到目标位置进行修改,对于比较复杂且过长的命令来说,效率不高. 以下信息来自 bash 的 man 页面: ...

  7. 在 Linux/windows下 命令行中使用和执行 PHP 代码[交互式php]

    [注释]在ubuntu下,升级php到7.1版本,虽然提示的是Interactive mode enabled, 但实际上可以直接书写命令,和interactive shell效果一样. 一:wind ...

  8. 在命令行中直接运行带main方法的java

    用了很久的java,基本都是交给服务器完成的执行,有page之类的入口,或者是在IDE工具中直接 Run As Java Application. 并且一直对安装java之后配置JAVA_HOME,p ...

  9. Windows10 命令行中使用网络驱动器

    Windows10中,我们在局域网内使用共享文件夹,建立映射的网络驱动器,有时候需要一些软件去调用网络驱动器内的资源,但是发现在资源管理器能正常打开,应用软件却无法识别,命令行中提示:“系统找不到指定 ...

随机推荐

  1. Geolocation API JavaScript访问用户的当前位置信息

    Geolocation API在浏览器中的实现是navigator.geolocation对象,常用的有以下方法. 1.第一个方法是getCurrentPosition() 调用这个方法就会触发请求用 ...

  2. Python操作RabbitMQ

    RabbitMQ介绍 RabbitMQ是一个由erlang开发的AMQP(Advanced Message Queue )的开源实现的产品,RabbitMQ是一个消息代理,从“生产者”接收消息并传递消 ...

  3. iOS苹果推送功能实现步骤

    1.在钥匙串里 导出推送证书Apple Push notification Services 的 certificate, 命名为cer.p12,放在电脑桌面 ,期间密码设为123456 2.在钥匙串 ...

  4. Spring-----定时任务Quartz配置

    第一种,作业类继承自特定的基类:org.springframework.scheduling.quartz.QuartzJobBean. 第一步:定义作业类 import org.quartz.Job ...

  5. 创建文本注记TextElement

    1.创建一个字体 /// <summary> /// 字体设置 /// </summary> /// <param name="size">Th ...

  6. Spring系列之AOP实现的两种方式

    AOP常用的实现方式有两种,一种是采用声明的方式来实现(基于XML),一种是采用注解的方式来实现(基于AspectJ). 首先复习下AOP中一些比较重要的概念: Joinpoint(连接点):程序执行 ...

  7. nginx正则表达式

    1.^:匹配字符串的开始位置: 2..*: .匹配任意字符,*匹配数量0到正无穷: 3.\. 斜杠用来转义,\.匹配.: 4.(jpg|gif|png|bmp)匹配jpg或gif或png或bmp 5. ...

  8. AJAX 与 MySQL

    AJAX 与 MySQL AJAX 可用来与数据库进行交互式通信. AJAX 数据库实例 下面的实例将演示网页如何通过 AJAX 从数据库读取信息: 实例   Select a person:   P ...

  9. hzwer模拟赛 Hzwer的陨石

    题目描述 Description 经过不懈的努力,Hzwer召唤了很多陨石.已知Hzwer的地图上共有n个区域,且一开始的时候第i个陨石掉在了第i个区域.有电力喷射背包的ndsf很自豪,他认为搬陨石很 ...

  10. codevs2645 Spore

    题目描述 Description 某陈和某Y 最近对一个游戏着迷.那是Electronic Arts 今年发布的优秀的模拟经营类游戏,Spore. 在Spore 中,玩家将经历从单细胞生物到星系的统治 ...