[MPlayer-cygwin] MultiByteToWideChar et al.
Ulf-Dietrich Braumann
braumann at uni-leipzig.de
Mon Oct 25 21:16:28 EEST 2021
Hello,
I am trying to build version mplayer 1.4 (as well as a source snapshot as of
Oct 25, 2021) on a well administered cygwin installation
%uname -a CYGWIN_NT-10.0 XXXX-XX-XXX 3.2.0(0.340/5/3) 2021-03-29 08:42 x86_64
Cygwin
however, I end up with some weird codepage trouble:
cc -MMD -MP -Wundef -Wall -Wno-switch -Wno-parentheses -Wpointer-arith
-Wredundant-decls -Werror=format-security -Wstrict-prototypes
-Wmissing-prototypes -Wdisabled-optimization -Wno-pointer-sign
-Wdeclaration-after-statement -std=gnu99 -Werror-implicit-function-declaration
-D_XOPEN_SOURCE=600 -D_ISOC99_SOURCE -I. -Iffmpeg -O4 -march=native
-mtune=native -pipe -ffast-math -fomit-frame-pointer -fno-tree-vectorize
-fno-asynchronous-unwind-tables -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
-D_LARGEFILE64_SOURCE -fno-common -DPIC -D_WIN32_WINNT=0x0600
-I/usr/include/p11-kit-1 -I/usr/local/include/openjpeg-2.1
-I/usr/include/freetype2 -I/usr/include/libpng16 -DZLIB_CONST
-I/usr/include/opus -I/usr/include/libxml2 -c -o stream/stream.o
stream/stream.c
stream/stream.c: In function 'open_stream_plugin':
stream/stream.c:165:62: warning: initialization discards 'const' qualifier from
pointer target type [-Wdiscarded-qualifiers]
165 | { "stream url", arg , CONF_TYPE_CUSTOM_URL, 0, 0 ,0, sinfo->opts };
| ^~~~~
In file included from stream/stream.c:19: stream/stream.c: In function 'parse_chapter_range': stream/stream.c:724:24: warning: array subscript has type 'char' [-Wchar-subscripts]
724 | if(*range && isdigit(*range)) {
| ^~~~~~
stream/stream.c:740:16: warning: array subscript has type 'char' [-Wchar-subscripts]
740 | if(! isdigit(*s)) {
| ^~
stream/stream.c: In function 'utf8_to_wide_char': stream/stream.c:758:26: error: implicit declaration of function 'MultiByteToWideChar' [-Werror=implicit-function-declaration]
758 | int wide_char_size = MultiByteToWideChar(CP_UTF8, MB_ERR_INVALID_CHARS, utf8, -1, wide_char, 0);
| ^~~~~~~~~~~~~~~~~~~
stream/stream.c:758:46: error: 'CP_UTF8' undeclared (first use in this function); did you mean 'IUTF8'?
758 | int wide_char_size = MultiByteToWideChar(CP_UTF8, MB_ERR_INVALID_CHARS, utf8, -1, wide_char, 0);
| ^~~~~~~
| IUTF8
stream/stream.c:758:46: note: each undeclared identifier is reported only once for each function it appears in stream/stream.c:758:55: error: 'MB_ERR_INVALID_CHARS' undeclared (first use in this function)
758 | int wide_char_size = MultiByteToWideChar(CP_UTF8, MB_ERR_INVALID_CHARS, utf8, -1, wide_char, 0);
| ^~~~~~~~~~~~~~~~~~~~
stream/stream.c: In function 'wide_char_to_local_windows_code_page':
stream/stream.c:781:21: error: implicit declaration of function 'WideCharToMultiByte' [-Werror=implicit-function-declaration]
781 | int ansi_size = WideCharToMultiByte(CP_ACP, 0, wide_char, -1, NULL, 0, NULL, NULL);
| ^~~~~~~~~~~~~~~~~~~
stream/stream.c:781:41: error: 'CP_ACP' undeclared (first use in this function)
781 | int ansi_size = WideCharToMultiByte(CP_ACP, 0, wide_char, -1, NULL, 0, NULL, NULL);
| ^~~~~~
cc1: some warnings being treated as errors make: *** [Makefile:730:
stream/stream.o] Error 1
Some ideas how to solve? Last time when I was building mplayer 1.3 I did not
have such problems.
Regards - UD
More information about the MPlayer-cygwin
mailing list