This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: GDB MinGW build error: implicit declaration of function 'wcsncasecmp'
- From: Eli Zaretskii <eliz at gnu dot org>
- To: asmwarrior <asmwarrior at gmail dot com>
- Cc: gdb at sourceware dot org
- Date: Wed, 18 Dec 2013 17:35:54 +0200
- Subject: Re: GDB MinGW build error: implicit declaration of function 'wcsncasecmp'
- Authentication-results: sourceware.org; auth=none
- References: <52B17083 dot 7040404 at gmail dot com>
- Reply-to: Eli Zaretskii <eliz at gnu dot org>
> Date: Wed, 18 Dec 2013 17:53:07 +0800
> From: asmwarrior <asmwarrior@gmail.com>
>
> 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.