[Mingw-users] wincon.h update and some problems exposed by testing it.

Back to archive index

Eli Zaretskii eliz****@gnu*****
Wed Aug 1 00:06:36 JST 2018


> From: David Gressett <DGres****@amli-*****>
> Date: Mon, 30 Jul 2018 22:08:20 -0500
> 
> One of the nonexistent features  was _getwch(), which is wide-character equivalent to _getch(), which MinGW does have.

What do you mean "nonexistent"?  What happens if you try linking a
program that calls it?

> #define _getwch _getch
> 
> The other problem was an urecognizable main routine declaration.
> 
> int __cdecl wmain(int argc, WCHAR* argv[])
> 
> did not work; it was not recognized as the main routine and caused a link-time error.
> 
> The obvious replacement 
> 
> int main(int argc, char * argv[])
> 
> did work. 

I think these replacements only work by sheer luck: where a program
really needs wide characters, these replacements will break.

Regarding wmain, I think that MinGW should provide it in its library,
because otherwise a program needs to retrieve and parse the
command-line arguments by itself, it wants to support Unicode command
lines.




More information about the MinGW-Users mailing list
Back to archive index