Search code examples
c++command-line-argumentswchar-tcl.exe

What does the minus in /Zc:wchar_t- mean?


Recently I had some linking issues caused by the presence (or absence) of this flag.

/Zc:wchar_t-

I've read the docs, but they don't mention the trailing minus. But every discussion of it seems to include it. What does it mean?


Solution

  • /Zc:wchar_t- does the opposite of what /Zc:wchar_t does: it causes wchar_t to be treated as the same type as unsigned short, for compatibility with VC6.

    /Zc:wchar_t- causes your code to be non-conformant with standard C++, so don't use it unless you must.