Friday, July 23, 2010

MinGW 64bit Cross Compilation: rpl_malloc/rpl_realloc Missing

Are you cross compiling an autoconf-iscated project for a 64bit Windows target, using MinGW, and you're getting linker errors complaining about missing rpl_malloc and/or rpl_realloc?

undbx.o:undbx.c:(.text+0xe2a): undefined reference to `_rpl_realloc'

The reason is explained in this autoconf mailing list thread.

The workaround is to disable the compatibility testing of malloc/realloc with the GNU C library, like this:
export ac_cv_func_realloc_0_nonnull=yes
export ac_cv_func_malloc_0_nonnull=yes
./configure --host=amd64-mingw32msvc

No comments:

Post a Comment