[Locale] MinGW + ICU + cross compiling = wchar errors?
Hello! I'm trying to compile Boost.Locale 1.51.0 with ICU 1.50 support in x86_64 MinGW-w64 4.7.2. So to start off, I have a structure of all my libs, includes and whatnot at /home/jookia/Programming/mingw64. I've built ICU using this command and installed it: CXXFLAGS=-fpermissive ../configure --prefix=/home/jookia/Programming/mingw64/ --host x86_64-w64-mingw32 --with-cross-build=/home/jookia/Programming/local/icu/source/build --enable-static --enable-shared --with-data-packaging=archive --with-library-bits=64 Building Boost uses this user-config: using gcc : 4.7 : x86_64-w64-mingw32-g++ : <rc>x86_64-w64-mingw32-windres <archiver>x86_64-w64-mingw32-ar <compileflags>-I/home/jookia/Programming/mingw64/include/ <linkflags>-L/home/jookia/Programming/mingw64/lib/ ; and this command: bjam threadapi=win32 target-os=windows variant=release threading=multi link=shared runtime-link=shared --prefix=/home/jookia/Programming/mingw64 --user-config=user-config.jam --without-python --without-mpi --layout=tagged -sNO_BZIP=1 -sNO_ZLIB=1 install In order to try and build Boost.Locale I've patched its Jamfile to remove the shared libstdc++ stuff as MinGW doesn't seem to support it, and also rename all of the searched-lib <name>s to their MSVC equivalents so I can find those. The command it used to build is this (stuff omitted to save space): "x86_64-w64-mingw32-g++" "-Wl,--out-implib,bin.v2/libs/locale/build/.../libboost_locale-mt.dll.a" -o "bin.v2/libs/locale/build/.../libboost_locale-mt.dll" -Wl,-h -Wl,libboost_locale-mt.dll -shared -Wl,--start-group ... -Wl,-Bstatic -Wl,-Bdynamic -licuuc -licuin -licudt -liconv -Wl,--end-group -L/home/jookia/Programming/mingw64/lib/ -mthreads Compiling works fine up until linking, where it gives a few errors like this (paths and mangled names omitted to save sapce): bin.v2/.../formatter.o:formatter.cpp:(... undefined reference to `icu_50::UnicodeString::UnicodeString(wchar_t const*, int)' Is there any solution to this or is this something to do with MinGW's lack of support for wchars? Thanks, Jookia.
On 29/10/12 21:07, Jookia wrote:
Hello! <SNIP> Thanks, Jookia.
Hello! I figured out that it was because ICU was compiling with the -std=c++11 flag which made UChar char16_t instead of wchar_t, which Boost.Locale was trying to use since it wasn't using C++11. I fixed this by removing the c++11 flag from ICU (just removed it from the configure script). Thanks, Jookia.
participants (1)
-
Jookia