Re: [Mingw-w64-public] Calling wprintf from a C++ program

2017-11-09 Thread David Lee
One more note. After some testing I found that: (1) If you write C++ code with mingw-w64 but you manage to NOT include any system C++ headers, __USE_MINGW_ANSI_STDIO will NOT be defined. (2) You might accidentally #include one without knowing. As an example: #include With mingw-w64, on g++

Re: [Mingw-w64-public] Calling wprintf from a C++ program

2017-11-09 Thread Liu Hao
On 2017/11/9 15:46, David Lee wrote: Thanks for the reply. You are welcome. :> (1) Your observation seems to apply to the whole *wprintf() family (fwprintf(), swprintf(), etc), not just wprintf(). It seems so. I am not clear how libstdc++ is making use if these functions. If they didn't

Re: [Mingw-w64-public] Calling wprintf from a C++ program

2017-11-08 Thread David Lee
Thanks for the reply. (1) Your observation seems to apply to the whole *wprintf() family (fwprintf(), swprintf(), etc), not just wprintf(). (2) On Windows with gcc/g++: (a) If I need to migrate some C code (using broken *wprintf()) into C++, and (b) the inclusion of stdio.h is to be

Re: [Mingw-w64-public] Calling wprintf from a C++ program

2017-11-08 Thread Liu Hao
On 2017/11/9 12:13, David Lee wrote: Hello. I have an issue that isn't necessarily related to mingw-w64. Could be gcc/g++, libstdc++ or even my mistake. Let me have a starting point here. (... abridged ...) > [Question] Did I do something wrong or is the issue not related to mingw-w64? (it

[Mingw-w64-public] Calling wprintf from a C++ program

2017-11-08 Thread David Lee
Hello. I have an issue that isn't necessarily related to mingw-w64. Could be gcc/g++, libstdc++ or even my mistake. Let me have a starting point here. I downloaded Mingw-w64 GCC toolchains (5.4.0, 6.4.0, sjlj, x86 version) from here: