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:

  1. The size of .lib files from b2 is different from the size of the corresponding bjam file.
  2. 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:

  1. B2:

    b2 toolset=msvc-12.0 --build-type=complete architecture=x86 address-model=32 install --build-dir=<build-dir> stage --stagedir=<stage-dir> -j2
    
          

  2. bjam:

    bjam stage --stagedir=<stage-dir>
    
          

+6


source to share


1 answer


b2 and bjam are identical files, except for their names. Different results result from calling them with different arguments.



About preferred name: call ./b2 --help

and ./bjam --help

both give a name b2

.

0


source







All Articles