# Installing boost libraries for GCC (MinGW) on Windows
## Folder setup
1. Extract downloaded boost source, e.g. `C:\Program Files\boost_1_59_0`.
2. Create a folder for Boost.Build installation, e.g. `C:\Program Files\boost-build`.
2. Create a folder within for building, i.e. `C:\Program Files\boost_1_59_0\build`.
3. Create a folder for installation, e.g. `C:\Program Files\boost`.
## GCC setup
1. Open Command Prompt.
2. Run `g++ --version`.
3. If the output contains g++ version number then GCC should be set up properly to run from command line and you can continue.
## Boost.Build setup
1. Open Command Prompt and navigate to `C:\Program Files\boost_1_59_0\tools\build`.
2. Run `bootstrap.bat mingw`.
3. Run `b2 install --prefix="C:\Program Files\boost-build"`.
4. Add `C:\Program Files\boost-build\bin` to Windows PATH.
## boost building
1. Open Command Prompt and navigate to `C:\Program Files\boost_1_59_0`.
2. Run
```
b2 --build-dir="C:\Program Files\boost_1_59_0\build" --prefix="C:\Program Files\boost" toolset=gcc install
```
## Project setup
1. Add include folder, i.e. `C:\Program Files\boost\include\boost-1_59`.
2. Add linker folder, i.e. `C:\Program Files\boost\lib`.
3. Link required libraries, e.g. `libboost_regex-mgw48-mt-1_59.a`.