- This Guide assumes that you have installed msys2, mingw-64 using this link https://gist.github.com/ahmednawazkhan/4da8acbdafe0798527874b0f00f16e45
- This guide was made with the help of https://gist.github.com/sim642/29caef3cc8afaa273ce6
- Download boost from https://www.boost.org/users/download/
- Extract the contents to
/c/downloads/boost_1_77_0 - Create a folder within for building.
/c/downloads/boost_1_77_0/build - Create a folder for Boost Build installation
/c/downloads/boost-build - Create a folder for installation
/c/libs/boost - Make sure
g++ --versionis successfuly running - Open
Msys2 Mingw 64-bitwith administrative rights - Navigate to
/c/downloads/boost_1_77_0/tools/build - Run
./bootstrap.bat mingw - Run
./b2 install --prefix="/c/downloads/boost-build" - Add
/c/downloads/boost-build/binto Windows PATH. - In order for msys2 to have windows environment variables, add
MSYS2_PATH_TYPE=inheritvariable to windows environment. - Close
Msys2and restart using administrative rights - Verify that you can access
b2and windows env variables are picked up by Msys2 - Navigate to
/c/downloads/boost_1_77_0 - Run
b2 --build-dir="/c/downloads/boost_1_77_0/build" --prefix="/c/libs/boost" toolset=gcc install - After Installation is complete go to your project and go to its
buildfolder - Run
cmake -DBoost_ROOT="/c/libs/boost" path_to_cmakelist - Add
Boost_ROOTto windows env varaibles to run cmake without passingBoost_ROOTparam.