Installing boost on Windows using MinGW-w64 (gcc 64-bit)
Boost is easy when you are using headers or pre-compiled binaries for visual studio, but it can be a pain to compile from source on windows, especially when you want the 64-bit version of MinGW to use gcc/g++. This installation process should be thorough enough to simply copy and paste commands, but robust enough to install everything you need.
Note: if you need to install any of the libraries that need dependencies, see this great answer from stack overflow
Get files needed for install
Get the MinGW installer mingw-w64-install.exe from Sourceforge
Get the boost_1_68_0.zip source from Sourceforge
Note: This should work perfectly with other versions of boost as well
Copy these to a new folder
It should now contain the following two files
Run the installer
After the install, add a hard link (junction) to the folder
Open a command prompt AS ADMIN
- windows key -> type "cmd"
- right click "command prompt"
- Run as administrator
Enter the following command to create a link to MinGW folder in C:\
mklink /J C:\MinGW "C:\Program Files\mingw-w64\x86_64-8.1.0-posix-seh-rt_v6-rev0\mingw64"
Add MinGW to the system PATH
Navigate to install
unzip to "install/boost_1_68_0"
powershell -command "Expand-Archive C:\install\boost_1_68_0.zip C:\install"
This takes about 15 minutes
Make directories for building and install
Build boost.build with b2
b2 --prefix="C:\boost-build" install
Add C:\boost-build\bin to your session PATH variable
navigate back up to the boost unzipped root directory
Build boost with b2
b2 --build-dir="C:\install\boost_1_68_0\build" --build-type=complete --prefix="C:\boost" toolset=gcc install
This is going to take awhile, so try to run this command right before beginning the director's cut of Lord of the Ring Return of the King.
When this is done you should see the following output
You can now delete "C:\install" and "C:\boost-build"
Adding to projects
Everything should now be installed
Link required libraries: