A short note on crosscompiling boost for 64bit windows using mingw64.
First get a build of mingw64 eg. from
http://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Automated%20Builds/
I did use mingw-w64-bin_i686-linux_20110206.tar.bz2 since the build system is 32bit linux.
Get a recent version of the boost libraries.
Update the path to reflect where mingw64 was put.
Unpack boost and add a corresponding definition of gcc to tools/build/v2/user-config.jam
Mine was
using gcc : mingw64 : x86_64-w64-mingw32-g++ : 4.6 ;
Then build boost with bjam.
./bootstrap.sh
./bjam --layout=versioned --tolset=gcc-mingw64 define=BOOST_USE_WINDOWS_H address-model=64 threadapi=win32 target-os=windows --with-thread stage
The define=BOOST_USE_WINDOWS_H is crucial else the compilation will fail.
Advertisement
March 7, 2011 at 5:20 pm
Nice work, dude!
August 18, 2011 at 8:04 am
Thanks a lot. I think there is a little mistake in bjam arguments. “–toolset=gcc-mingw64″ should be specified instead of “–tolset”.