While migrating an old C++ project from Visual Studio 6 up to Visual Studio 2012, we came across an odd set of warnings from inside the standard Microsoft platform headers:<
Haven't found a solution to this published anywhere online, so here's what worked for me.
I'm building a project with 110_xp tools
I get these warnings ...
c:\program files (x86)\microsoft sdks\windows\v7.1a\include\sal_supp.h(57): warning C4005: '__useHeader' : macro redefinition
C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\sal.h(2872) : see previous definition of '__useHeader'
c:\program files (x86)\microsoft sdks\windows\v7.1a\include\specstrings_supp.h(77): warning C4005: '__on_failure' : macro redefinition
C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\sal.h(2882) : see previous definition of '__on_failure'
Clearly an inconsistency between the VC 11 headers and 7.1a sdk headers.
In my stdafx.cpp I did this ...
#define _USING_V110_SDK71_
#include "stdafx.h"
... the build problem has gone away.