Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Wireshark-dev: Re: [Wireshark-dev] win64: got 'winver.h' file not found compile error

From: Anders Broman <a.broman58@xxxxxxxxx>
Date: Sat, 22 Jul 2017 21:25:15 +0200


Den 22 juli 2017 8:41 em skrev "Guy Harris" <guy@xxxxxxxxxxxx>:
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".


What version of cmake are you using? I think someone had a similar problem with an rc of cmake 3.9?
Regards 
Anders
___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev@xxxxxxxxxxxxx>
Archives:    https://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-request@wireshark.org?subject=unsubscribe