Visual studio 2012 warning C4005: __useHeader macro redefinition

  • Thread starter Thread starter Disha Sharma
  • Start date Start date
D

Disha Sharma

Guest
I have migrated my code from VS2008 to 2012 and I am getting lots of warnings saying:

c:\program files\microsoft sdks\windows\v7.1\include\sal_supp.h(58): 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\microsoft sdks\windows\v7.1\include\specstrings_supp.h(78): warning C4005: __on_failure : macro redefinition
C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\sal.h(2883) : see previous definition of __on_failure



I am using Win7 x64 PC. Platform toolset is set to Visual Studio 2012 v110.

I am trying to do the following:-

Project Properties --> Configuration Properties --> VC++ Directories --> Include Directories

C:\Program Files (x86)\Microsoft DirectX SDK (August 2009)\Include

C:\Program Files\Microsoft SDKs\Windows\v7.1\Include\gl

C:\Program Files\Microsoft SDKs\Windows\v7.1\Include

Here I am getting warnings for same macro being defined in C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\ and c:\program files\microsoft sdks\windows\v7.1\include\


I have read answers saying modify the files and use #ifndef or #undef code but that is not the right way.

How is it possible that Microsoft has not given a fix for it. If only #ifndef or #undef is required why microsoft didnt fix it.


Please advice...

Thanks.

Continue reading...
 
Back
Top