This is an old revision of the document!
Building the Boost libraries on Windows
(using MinGW / MSYS)
Build tools
See boost_jam.
Main libraries
Download the main Boost libraries from http://downloads.sourceforge.net/project/boost/boost/1.40.0/boost_1_40_0.tar.gz and extract them somewhere convenient:
$ tar zxvf boost/boost_1_40_0.tar.gz
Let's see what we've got:
$ bjam --show-libraries The following libraries require building: - date_time - filesystem - graph - graph_parallel - iostreams - math - mpi - program_options - python - regex - serialization - signals - system - test - thread - wave
Jam will detect that you're running Windows and (rather then check what's available) assume that you want to use the MSVC toolchain; you have to force it to use gcc instead. You should also use a separate build directory; it will make it easier to clean up if you make a mistake and need to start over.
$ mkdir obj $ bjam toolset=gcc --prefix=/usr/local --build-dir=obj
You will get a number of warnings about Boost.Python, Boost.Regex, Boost.Graph and Boost.MPI; you can safely ignore them, as metlibs doesn't use any of them. If it bothers you, you can disable the offending components:
$ bjam toolset=gcc --prefix=/usr/local --build-dir=obj --without-python \ --without-regex --without-graph --without-graph_parallel --without-mpi
If all goes well, you will find the libraries in the stage/lib
subdirectory (under the source tree, not under obj
; this is IMHO a mistake on bjam's part). You can copy them to wherever you need them to be, most likely /mingw/lib
.