【发布时间】:2017-06-24 19:16:48
【问题描述】:
我正在尝试使用 msbuild 构建 Visual Studio 解决方案 (C++)
msbuild.exe mysolution.sln /p:platform="ARM" /p:configuration="Release"
我收到了这个错误
error : all paths through this function will call itself [-Werror,-Winfinite-recursion]
我只想能够从命令行关闭 -Werror,而不是在 Project Properties > Configuration Properties > C/C++ > Treat Warnings As Errors 中关闭它
谢谢!
编辑 1。 我还想设置其他无法在代码中修复的项目属性,例如 Configuration Properties > General > Platform Toolset 和 Configuration Properties > General > Use of STL。 FWIW,正如您从上面的命令行中看到的那样,我的目标是 ARM 平台。
【问题讨论】:
-
修复函数怎么样?
-
好建议,但他的功能在我无法修改的外部库中。
-
How to set PreProcessorDefinitions as a task propery for the msbuild task 的可能重复项;该问题是关于预处理器定义而不是“将警告视为错误”,但原理完全相同。
标签: android c++ visual-studio msbuild