On Jul 22, 2017, at 7:30 AM, 蹉跎 <qiangxiong.huang@xxxxxx> wrote:
> Is DISABLE_WERROR must set to ON manually in windows? (If it is OFF, '/WX' options will be added into rc.exe command, that will ignore INCLUDE environment, and finally cause 'winver.h' not found error).
If /WX causes MSVC to ignore the INCLUDE environment, have you reported that bug to Microsoft? For:
Visual Studio .NET 2003:
https://msdn.microsoft.com/en-us/library/thxezb7y(v=vs.71).aspx
Visual Studio 2005:
https://msdn.microsoft.com/en-us/library/thxezb7y(v=vs.80).aspx
Visual Studio 2008:
https://msdn.microsoft.com/en-us/library/thxezb7y(v=vs.90).aspx
Visual Studio 2010:
https://msdn.microsoft.com/en-us/library/thxezb7y(v=vs.100).aspx
Visual Studio 2012:
https://msdn.microsoft.com/en-us/library/thxezb7y(v=vs.110).aspx
Visual Studio 2013:
https://msdn.microsoft.com/en-us/library/thxezb7y(v=vs.120).aspx
Visual Studio 2015:
https://msdn.microsoft.com/en-us/library/thxezb7y.aspx
Visual Studio 2017:
https://docs.microsoft.com/en-us/cpp/build/reference/compiler-option-warning-level
Microsoft documents /WX as:
Treats all warnings as errors. For a new project, it may be best to use /WX in all compilations; resolving all warnings will ensure the fewest possible hard-to-find code defects.
and says nothing about includes. There is a /X option, which "Prevents the compiler from searching for include files in directories specified in the PATH and INCLUDE environment variables.", but "/WX" should not be interpreted as "/W /X".