Re: GDB MinGW build error: implicit declaration of function 'wcsncasecmp'

Eli Zaretskii <[email protected]>
Newsgroups gmane.comp.gdb.devel
Message-ID <[email protected]>
> Date: Wed, 18 Dec 2013 17:53:07 +0800
> From: asmwarrior <[email protected]>
> 
> I see the build error when I build GDB(git head) under MSYS+MinGW, here the is build log
> 
> mv -f .deps/pe-i386.Tpo .deps/pe-i386.Plo
> rm -f peigen.c
> sed -e s/XX/pe/g < ../../binutils-gdb/bfd/peXXigen.c > peigen.new
> mv -f peigen.new peigen.c
> /bin/sh ./libtool --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I../../binutils-gdb/bfd -D__USE_MINGW_FSEEK    -I. -I../../binutils-gdb/bfd -I../../binutils-gdb/bfd/../include  -DHAVE_i386pe_vec -DHAVE_i386pei_vec -DHAVE_bfd_elf32_i386_vec -DHAVE_bfd_elf32_little_generic_vec -DHAVE_bfd_elf32_big_generic_vec  -DBINDIR='"/mingw/bin"'  -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Wno-format -Werror -O0 -g -D__USE_MINGW_ACCESS -MT peigen.lo -MD -MP -MF .deps/peigen.Tpo -c -o peigen.lo peigen.c
> libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../../binutils-gdb/bfd -D__USE_MINGW_FSEEK -I. -I../../binutils-gdb/bfd -I../../binutils-gdb/bfd/../include -DHAVE_i386pe_vec -DHAVE_i386pei_vec -DHAVE_bfd_elf32_i386_vec -DHAVE_bfd_elf32_little_generic_vec -DHAVE_bfd_elf32_big_generic_vec -DBINDIR=\"/mingw/bin\" -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Wno-format -Werror -O0 -g -D__USE_MINGW_ACCESS -MT peigen.lo -MD -MP -MF .deps/peigen.Tpo -c peigen.c -o peigen.o
> peigen.c: In function 'rsrc_cmp':
> peigen.c:3006:7: error: implicit declaration of function 'wcsncasecmp' [-Werror=implicit-function-declaration]
>        res = wcsncasecmp (& awc, & bwc, 1);
>        ^

MinGW doesn't have this function, it needs to be emulated using the
non-standard lstrcmpiW.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.