/opt/compilers/lib/gcc/i486-mingw32/3.4.3/../../../../include/c++/3.4.3/cstdlib:103: error: `::malloc' has not been declared
/opt/compilers/lib/gcc/i486-mingw32/3.4.3/../../../../include/c++/3.4.3/cstdlib:111: error: `::realloc' has not been declared
i came across the same prob in my trial to crosscompile the remotegui for windows. in
cstdlib it tries to redefine malloc and realloc, which doesnt seem to work. i commented out these lines in cstdlib:
#undef malloc
#undef realloc
using ::malloc;
using ::realloc;
and now it works like a charm.

i hope, this helps you to solve your prob.
so long,