I am attempting to use Mingw-w64's 32-bit compiler (the i686-w64-mingw32
toolchain) to cross-compile the ICU library for Windows. The host is Ubuntu 12.10 64-bit.
The steps I have taken look something like this:
Grab the latest source code archive from here and extract it.
Make two copies of the
source/
directory - one for the host and one for the target.For the host build:
./configure ; make
For the target build:
./configure --host=i686-w64-mingw32 --with-cross-build=<host_source_dir>
...where
<host_source_dir>
is the directory from the previous step.When I run
make
in the target source directory, compilation proceeds without any errors for a few moments and then throws this error:i686-w64-mingw32-g++ -O2 -W -Wall -pedantic -Wpointer-arith -Wwrite-strings -Wno-long-long -mthreads -o ../../bin/uconv.exe uconv.o uwmsg.o -L../../lib -licuin50 -L../../lib -licuuc50 -L../../stubdata -licudt50 -lm uconvmsg/uconvmsg.a uconv.o:uconv.cpp:(.text+0x2f): undefined reference to `_uconvmsg_dat'
What could be causing this error? I backed up a few lines and also noticed this:
pkgdata: i686-w64-mingw32-gcc -O2 -Wall -std=c99 -pedantic -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -mthreads -shared -Wl,-Bsymbolic -Wl,--enable-auto-import -Wl,--out-implib=./all.lib -o ../lib/icudt50.dll ./out/tmp/icudt50l_dat.o Cannot export icudt50_dat: symbol not found collect2: ld returned 1 exit status -- return status = 256 Error generating library file. Failed command: i686-w64-mingw32-gcc -O2 -Wall -std=c99 -pedantic -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -mthreads -shared -Wl,-Bsymbolic -Wl,--enable-auto-import -Wl,--out-implib=./all.lib -o ../lib/icudt50.dll ./out/tmp/icudt50l_dat.o Error generating assembly code for data.
What am I doing wrong?