Bruno Haible writes:
> Simon Josefsson wrote:
>> 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.
>
> Well spotted! This should fix it:
It works. Thank
Simon Josefsson wrote:
> 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.
Well spotted! This should fix it:
2010-04-24 Bruno Haible
ansi-c++-o
Bruno Haible 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 l
, 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):
Bruno Haible writes:
>> > Can you show the result of 'grep MEMCHR config.status' and the relevant
>> > portion of gllib/string.h ?
>>
>> S["REPLACE_MEMCHR"]="1"
>> S["HAVE_RAWMEMCHR"]="1"
>> S["HAVE_MEMCHR"]="1"
>> S["GNULIB_RAWMEMCHR"]="0"
>> S["GNULIB_MEMCHR"]="1"
>> D["HAVE_MEMCHR"]=" 1"
>> D
> > Can you show the result of 'grep MEMCHR config.status' and the relevant
> > portion of gllib/string.h ?
>
> S["REPLACE_MEMCHR"]="1"
> S["HAVE_RAWMEMCHR"]="1"
> S["HAVE_MEMCHR"]="1"
> S["GNULIB_RAWMEMCHR"]="0"
> S["GNULIB_MEMCHR"]="1"
> D["HAVE_MEMCHR"]=" 1"
> D["GNULIB_TEST_MEMCHR"]=" 1"
>
>
est-string-c++2.o test-string-c++2.cc
>> mv -f .deps/test-string-c++2.Tpo .deps/test-string-c++2.Po
>> 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'
st-string-c++2.Po
> 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'
> test-string-c++.o:(.rodata+0x0): undefined reference to `rpl_memchr'
> test-string-c++2.o:(
ing-c++2.o
../gllib/libgnu.a
test-string-c++.o:(.data+0x0): undefined reference to `rpl_memchr'
test-string-c++.o:(.rodata+0x0): undefined reference to `rpl_memchr'
test-string-c++2.o:(.rodata+0x0): undefined reference to `rpl_memchr'
collect2: ld returned 1 exit status
make[4]: *** [