Wireshark-dev: Re: [Wireshark-dev] Wireshark w/ MSVC++ 2005 EE fails to capture

From: Ulf Lamping <ulf.lamping@xxxxxx>
Date: Sat, 27 Jan 2007 05:04:16 +0100
Stephen Fisher wrote:
On Sat, Jan 27, 2007 at 03:39:58AM +0100, Ulf Lamping wrote:
It might be a good idea to add a compile time check, it the MSVC_VARIANT setting matches the _MSC_VER define. This way, such problems are at least harder to make :-)

Would it be possible to just set MSVC_VARIANT automatically according to the _MSC_VER define
Unfortunately not - at least not in a way that I see.

For example there are four compiler packages possible for the C compiler version 8.0, so there's no 1:1 relationship. In addition the MSVC_VARIANT is needed for some differences in the NSIS packaging (and probably elsewhere), where _MSC_VER has just no effect. In fact most (all?) changes controlled with MSVC_VARIANT are outside the scope of _MSC_VER.

So what could be done is a check that MSVC_VARIANT matches the _MSC_VER, at least this will prevent people from forgetting to set this altogether - as _MSC_VER 6 (the default) is only supported by one compiler package :-)

Regards, ULFL