3

Every time I build my project my Build output window is filled (one instance for every cpp file) with

1>d:\program files\microsoft sdks\windows\v7.1\include\sal_supp.h(57): warning C4005: '__useHeader' : macro redefinition
1>          d:\program files\microsoft visual studio 12.0\vc\include\sal.h(2886) : see previous definition of '__useHeader'
1>d:\program files\microsoft sdks\windows\v7.1\include\specstrings_supp.h(77): warning C4005: '__on_failure' : macro redefinition
1>          d:\program files\microsoft visual studio 12.0\vc\include\sal.h(2896) : see previous definition of '__on_failure'

It's not really a problem except that it makes it hard to parse the actual build errors when I break something. How can I fix the root of this error? Or at least silence it?

Sam Coulter
  • 708
  • 1
  • 6
  • 27
  • Possible duplicate of http://stackoverflow.com/questions/14363929/vs2012-c-warning-c4005-useheader-macro-redefinition – txtechhelp Apr 20 '14 at 05:29

1 Answers1

3

From a comment under the original question: VS2012 C++ warning C4005: '__useHeader': macro redefinition

Long story short, its a bug in VS, with no real workarounds.

I have chosen to just silence the specific warning code, which does silence all instances of macro re-definitions. But now I can actually read my build output so whatever I guess.

http://msdn.microsoft.com/en-us/library/jj715718.aspx

Community
  • 1
  • 1
Sam Coulter
  • 708
  • 1
  • 6
  • 27