Simon Josefsson wrote: > j...@mocca:~/src/gnulib/m master$ i586-mingw32msvc-nm gllib/libgnu.a | grep > memchr > memchr.o: > 00000000 T _rpl_memchr > U _rpl_memchr > j...@mocca:~/src/gnulib/m master$ i586-mingw32msvc-nm gllib/memchr.o > 00000000 b .bss > 00000000 d .data > 00000000 N .debug_abbrev > 00000000 N .debug_aranges > 00000000 N .debug_frame > 00000000 N .debug_info > 00000000 N .debug_line > 00000000 N .debug_loc > 00000000 N .debug_pubnames > 00000000 N .debug_ranges > 00000000 t .text > 00000000 T _rpl_memchr
OK, this proves that everything is fine with the 'memchr' module and that the problem is with the linking with libgnu.a. So let's look again at this line: > g++ -o test-string-c++.exe test-string-c++.o test-string-c++2.o > ../gllib/libgnu.a > test-string-c++.o:(.data+0x0): undefined reference to `rpl_memchr' Why is CXX="g++" being used when you are cross-compiling from linux to mingw?? Did you specify a CXX to configure? Or did configure find nothing usable because you haven't installed a 'i586-mingw32msvc-g++'? Bruno