/Za compiler directive does not compile system headers in VS2010

后端 未结 2 1117
野趣味
野趣味 2020-12-07 02:19

I wanted to disable language extensions to be able to do some tests in my project. I found that I must set /Za compiler directive from http://msdn.microsoft.com/en-us/librar

相关标签:
2条回答
  • 2020-12-07 02:48

    The windows headers have never compiled with /Za.

    There are other problems as well with /Za, that has caused Microsoft to stop testing their C++ standard library with that option. As told here:

    http://permalink.gmane.org/gmane.comp.lib.boost.devel/212180

    The recommendation is not to use it in "real" code.

    0 讨论(0)
  • Isolate your use of <windows.h> into a source file(s) that you don't compile with /Za and use the parameter on the other files.

    0 讨论(0)
提交回复
热议问题