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:
- warning C4005: '__useHeader' : macro redefinition
- warning C4005: '__on_failure' : macro redefinition
An online search only found a few other people running into this error. In some cases, it was people trying to use VS2012 to compile legacy DirectX code - which I am not doing. In other cases, it was people trying to use VS2012 to target Windows XP (using the new option from Update 1) - which I am doing.
The DirectX question was answered that the warning will always be there to tell you that you're compiling with an out-of-date (pre-Win8) version of DirectX, and you'll just have to live with it.
The Windows XP question was not answered. Other people simply said that they couldn't reproduce the problem.
I reproduced it, and found the cause, which I am writing up here to help anybody else who encounters this.
$(WindowsSDK_IncludePath)
which is version 8.0 all warnings went. – Purposive