- Extract downloaded Boost Source, e.g.
C:\Program Files\boost_1_59_0. - Create a folder for Boost.Build installation, e.g.
C:\Program Files\boost-build. - Create a folder within boost source for building, i.e.
C:\Program Files\boost_1_59_0\build. - Create a folder as Boost Binary location for installation, e.g.
C:\Program Files\boost.
- Open Command prompt/Terminal.
- Make sure that you have a C++ compiler and it can be called from Command prompt/Terminal.
- Open Command Prompt and navigate to
C:\Program Files\boost_1_59_0\tools\build. - Run
bootstrap.bat. Note:bootstrap.batcan take toolset flag as varible to set specific toolset. e.g.bootstrap.bat mingw - Run
b2 install --prefix="C:\Program Files\boost-build". - Add
C:\Program Files\boost-build\binto Windows PATH.
- Open Command Prompt and navigate to boost source location
C:\Program Files\boost_1_59_0. - Run below to build boost with
<select toolset>as toolset for building.
b2 --build-dir="C:\Program Files\boost_1_59_0\build" --prefix="C:\Program Files\boost" toolset=<select toolset> install
- Run below to find help
b2 --help
- Add include folder, i.e.
C:\Program Files\boost\include\boost-1_59. - Add linker folder, i.e.
C:\Program Files\boost\lib. - Link required libraries, e.g.
libboost_regex-mgw48-mt-1_59.lib.