How to set 2 byte wchar_t output?
The GCC uses a 4-byte wchar_t by default. I can set the option -fshort-wchar to get 2 bytes per wchar_t in the L"string constants" . But when I set the compiler option to my source file I get the famous warning message foo.o uses 2-byte wchar_t yet the output is to use 4-byte wchar_t ; use of wchar_t values across objects may fail Since I really want 2-byte wchar_t I also want the output to use this variant. Is there any linker option to tell it what I want? Edit This warning doesn't inhibit the linker to produce a valid output. But the dozens of false warnings cover other messages. In