警告 C4995 与错误 C4995 [英] warning C4995 vs error C4995
问题描述
当我构建一个项目(使用 VS2012)时,我多次得到以下输出:
When I build a project (with VS2012) I get folowing output several times:
warning C4995: 'DwmEnableComposition': name was marked as #pragma deprecated
当我将项目源文件复制到另一个项目(和不同的解决方案)时,我收到错误而不是警告(并且构建没有成功):
When I copy the projects sourcefiles into another project (and different solution) I get errors instead of warnings (and the build does not succeed):
error C4995: 'DwmEnableComposition': name was marked as #pragma deprecated
有什么办法可以让我收到警告而不是错误?
Is there anything I can do that I get warnings instead of errors?
这是我正在运行的项目(不是我自己的代码):http://federico-mammano.github.io/Oculus-SDK-0.4.4-beta-OpenGL-Demo/(OpenGL 示例)
That is the project I am running (it's not my own code): http://federico-mammano.github.io/Oculus-SDK-0.4.4-beta-OpenGL-Demo/ (the OpenGL example)
推荐答案
您可能为遇到错误的项目启用了SDL 检查"(在 C/C++ -> 常规下).这是新项目"向导中的一个选项.删除它,它会恢复为警告.
You probably have 'SDL checks' enabled for the project where you get an error (under C/C++ -> General). It's an option in the 'new project' wizard. Remove that and it'll revert back to a warning.
这篇关于警告 C4995 与错误 C4995的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!