B2 vs bjam to build Boost library
I created Boost for VS2013, 64 bit architecture using b2.exe
and bjam.exe
. According to Boost documentation , b2
should be used on top bjam
. Differences I notice:
- The size of .lib files from b2 is different from the size of the corresponding bjam file.
- Using bjam provides dynamic libraries .lib (without the -s tag as mentioned here ), but it does not provide .dll files to link ( so what to do now? ), Whereas using b2 gives both static and dynamic libraries with .dll files ... But the problem with using b2 is that it gives two dynamic .lib files - one starts with boost_xxxx.lib and the other starts with libboost_xxxx.lib, and both are of different sizes. Why?
Also I mentioned a different build directory using the build option --build-dir
, but what is the use of this directory? It consists of .obj, .rsp along with corresponding .dll and .lib files. Can this directory be deleted?
Here are the commands I used to build Boost:
-
B2:
b2 toolset=msvc-12.0 --build-type=complete architecture=x86 address-model=32 install --build-dir=<build-dir> stage --stagedir=<stage-dir> -j2
-
bjam:
bjam stage --stagedir=<stage-dir>
+6
source to share