Bruno Haible <br...@clisp.org> writes: >> 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??
Ah, that's the problem. > Did you specify a CXX to configure? No, just the commands shown in the first post. > Or did configure find nothing usable because you haven't installed a > 'i586-mingw32msvc-g++'? It is installed, but configure.ac doesn't call AC_PROG_CXX so it never checks for that tool. Adding AC_PROG_CXX to gltests/configure.ac solves the problem. I see that ansi-c++-opt.m4 may be attempting to do setup a C++ compiler, but it doesn't seem to work when cross-compiling. /Simon