[Qt-interest] Question about "wchar_t" support on Windows
Nikos Chantziaras
realnc at arcor.de
Thu Jan 20 16:58:39 CET 2011
On 01/20/2011 05:33 PM, Yves Bailly wrote:
>
> Greetings all,
>
> When building projects on Windows using Visual C++, I see the option
> -Zc:wchar_t- is set in QMAKE_CFLAGS in %QMAKESPEC%/qmake.conf. This
> option tells the compiler to *not* consider "wchar_t" as a native type,
> therefore it has to be defined somewhere (typically as an "unsigned
> short").
> This is for either Visual 2005, 2008 or 2010.
>
> I couldn't find any "good" reason for this, does someone have any hint?
Changing that would break source and binary compatibility. So it won't
change any time soon.
In C++, you can #include <cwchar> (or <wchar.h> in plain C) and should
have a working wchar_t. It's a standard ANSI-C header.
More information about the Qt-interest-old
mailing list