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/library/0k0w269d.aspx, but after this I have errors if I include windows headers. Is there a way to write standard compliant code(enforced by the compiler, not by other programmers/code reviews) in VS2010 and still use system headers?
Thanks you!
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With