【问题标题】:Getting irelevant warning about option 'Gm' is deprecated不推荐使用有关选项“Gm”的不相关警告
【发布时间】:2019-05-11 17:02:46
【问题描述】:

我用来编译我的项目的选项:

/JMC /GS /analyze- /Wall /Zc:wchar_t /ZI /Od /sdl /Fd"Dev\Project.pdb" /Zc:inline /fp:precise /D "_MBCS" /errorReport:prompt /WX- /Zc:forScope /RTC1 /Gd /Oy- /MTd /FC /Fa"Dev\" /EHsc /nologo /Fo"Dev\" /Fp"Dev\Project.pch" /diagnostics:classic 

如您所见,没有任何Gm 选项。无论如何,我每次都会收到此警告:

1>cl : Command line warning D9035: option 'Gm' has been deprecated and will be removed in a future release
1>cl : Command line warning D9007: '/Gm' requires '/Zi or /ZI'; option ignored

问题是Gm 在每个配置上都被禁用。我该如何解决这个问题?

【问题讨论】:

标签: c++ visual-studio


【解决方案1】:

问题出在 UI 中。 .vcxproj 文件中有 <MinimalRebuild Condition="'$(Configuration)|$(Platform)'=='Dev|Win32'">true</MinimalRebuild>,但 UI 一直显示该字段为空白。一旦我从.vcxproj 删除了这个警告,警告就不存在了。

【讨论】:

    猜你喜欢
    • 2021-02-26
    • 2020-01-31
    • 2020-09-26
    • 1970-01-01
    • 2020-05-14
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多