I am trying to build boost libraries on Windows 7 x64 machine using mingw. When I try to run b2
b2 --build-dir=\"C:\\boost\\build\" --toolset=gcc --with-python
Here is a tutorial I had written to compile Boost 1.45.0 on Windows 7 using MinGW. I copy the tutorial here in case the link breaks:
1) First we need to compile Boost. We'll use Boost's latest version: 1.45.0 (probably not the latest version at the time you'll read this tutorial.
1.1) Download Boost sources:
1.2) To compile Boost, we need to use BJam. BJam's sources are included in boost's sources. Yet, we can't use BJam's binaries: we must compile it because of the following problem: http://comments.gmane.org/gmane.comp.lib.boost.user/64146.
To compile BJam, go to Boost's sources, find build.bat (should be located in \boost_1_45_0\tools\build\v2\engine\src), run cmd, cd to build.bat's folder and execute: build.bat gcc
(source)
Compilation lasts less than 30 seconds.
1.3) Once BJam is compiled, we can now compile Boost. Add bjam.exe in $PATH, run cmd, cd \boost_1_45_0 then execute:
bjam --toolset=gcc "--prefix=C:\DestinationFolder" install
where DestinationFolder
is whatever folder path you want (source).
Compilation lasts around 30 minutes.