Take the tour ×

I am using Windows 7 64-bit, and want to compile the non-precompiled libraries (specifically, I need Filesystem) from the command line (I do not use MSVC). I have MinGW, but read on the Boost website that MSYS shell is not supported, so I'm trying to compile the libraries from the Windows command prompt.

First of all, running bootstrap.bat results in the following error:

Building Boost.Jam build engine 
operable program or batch file. 

Failed to build Boost.Jam build engine. 
Please consult bjam.log for furter diagnostics. 

You can try to obtain a prebuilt binary from 


Also, you can file an issue at http://svn.boost.org
Please attach bjam.log in that case. 

Plus, there is not bjam.log file anywhere in the boost_root directory.

Disregarding this error, and trying to run the downloaded bjam.exe file, I get another error:

c:/boost_1_45_0/tools/build/v2/build\configure.jam:145: in builds-raw
*** argument error
* rule UPDATE_NOW ( targets * : log ? : ignore-minus-n ? )
* called with: ( <pbin.v2\libs\regex\build\gcc-mingw-4.5.2\debug\address-model64\architecture-x86>has_icu.exe :  : ignore-minus-n : ignore-minus-q )
* extra argument ignore-minus-q
(builtin):see definition of rule 'UPDATE_NOW' being called
c:/boost_1_45_0/tools/build/v2/build\configure.jam:179: in configu
c:/boost_1_45_0/tools/build/v2/build\configure.jam:216: in object(

etc. with quite a lot of complaints. Setting the 'architecture' and 'address-model' options doesn't help.

Any suggestions?


Following Andre's suggestion, I created minGW-bjam that was running for an hour and a half and built most of the libraries, but not the one I need at this moment: Filesystem. Trying to compile only Filesystem, specifying version 2 with define="BOOST_FILESYSTEM_VERSION=2" and --disable-filesystem3 does not help. I get the following error:

gcc.compile.c++ bin.v2\libs\filesystem\build\gcc-mingw-4.5.2\debug\v3\src\operations.o
In file included from ./boost/filesystem/v3/operations.hpp:24:0,
             from libs\filesystem\v3\src\operations.cpp:48:
./boost/filesystem/v3/config.hpp:16:5: error: #error Compiling Filesystem version 3 
file with BOOST_FILESYSTEM_VERSION defined != 3
libs\filesystem\v3\src\operations.cpp:647:26: warning: 
'<unnamed>::create_symbolic_link_api' defined but not used

"g++"  -ftemplate-depth-128 -O0 -fno-inline -Wall -g -DBOOST_ALL_NO_LIB=1 -
I"." -c -o "bin.v2\libs\filesystem\build\gcc-mingw-4.5.2\debug\v3\src\operations.o"  

etc. with a lot of ...failed statements.

Any hints here?

share|improve this question
add comment

3 Answers

up vote 5 down vote accepted

The bootstrap script assumes the msvc compiler is available. But you can build bjam by hand without the bootstrap script:

Step into the tools\build\v2\engine\src directory and call "build.bat mingw". It will create a bjam.exe. You can then put it in your %PATH% or perhaps in the root boost directory...

To be honest, I usually build bjam like this with the msvc compiler and use this "msvc-bjam" to build my mingw boost libraries.

share|improve this answer
Hi Andre, thanks a lot. That did it, although bjam.exe did not work with the 64-bit-specific flags. Cheers! –  vkotor Mar 14 '11 at 16:30
Just used MinGW64 for 64-bit-specific stuff. Bjam worked with the newest release. –  Greg Kramida Aug 24 '12 at 18:16
add comment

It's easy. Just use "bootstrap.bat gcc" to select GCC

share|improve this answer
worked, but it is necessary to put "C:\MinGW\bin" inside of your PATH environmentvariable of Windows and restart beforehand, otherwise the gcc command is unknown. –  Jook Dec 3 '12 at 10:54
add comment

So... the first part of the problem was solved by Andre's suggestion. The second part was solved by setting the variable BOOST_FILESYSTEM_VERSION to 3 everywhere (the error above complains about incompatibility with what is set in file user.hpp). Although this is not the default option for Boost 1.45 that I'm using, it's the only thing that works (i.e. bjam wants to compile version 3 no matter what). So now I have version 3 of the filesystem library, and version 2 for all others, but that doesn't seem to be an issue for the moment.

I do have a problem with using Boost with OpenCV and Eigen libraries, though... off to the next challenge ;)

share|improve this answer
add comment

Your Answer


