[cfe-dev] Extra #defines for Windows SDK 6.0a/VS2008

Jesse Towner townerj at gmail.com
Fri Aug 6 07:00:58 PDT 2010


On Fri, 2010-08-06 at 15:24 +0200, Douglas Gregor wrote:

> I wonder how much will break if we start defining _MSC_VER? Does anyone know how mingw deals with this?
> 

I recently replied to Per on this, but forgot to CC it to the list, so
I'll provide the relevant stuff here.

MinGW has it's own version of the Platform SDK headers
in /include/w32api, and unfortunately it has a hard time working with
with the latest Platform SDK, DirectX SDK, or other SDK releases from
Microsoft until someone ports it to work with MinGW. I think Cygwin is
the same.

Intel C++ mimics MSVC++ to the extent that it defines _MSC_VER and
supports the same compiler extensions, and developers accustomed to
checking for __INTEL_COMPILER/__ICL before _MSC_VER to differentiate
between the two. That way it acts as a drop-in replacement for MSVC++.
And naturally, ICC also mimics GCC on Linux.

Borland C++ came with it's own copy of the Platform SDK headers, but I
think in it's later days it became compatible with MSVC++ in the same
way that Intel C++ is. I'm not 100% sure though.

- Jesse Towner




More information about the cfe-dev mailing list