initialization
windows:
bootstrap.bat
linux:
bootstart.sh
parameter
link=static|shared
threading=single|multi
runtime-link=static|shared
--with-
variant=debug|release
--build-type=complete
--toolset=msvc-10.0
address-model=64
Represents compiling into a 64-bit version. If this item is omitted, the default is to compile into a 32-bit version.
linux compile:
./b2 --build-type=minimal --with-date_time --with-filesystem --with-program_options --with-regex --with-serialization --with-system --with-thread --with-random --with-chrono variant=release link=static threading=multi address-model=64 stage
window compile:
bjam.exe --build-type=minimal --with-date_time --with-filesystem --with-program_options --with-regex --with-serialization --with-system --with-thread --with-random toolset=msvc-12.0 variant=release link=static threading=multi address-model=32 stage
build directory
--stagedir=./stage_debug use bcp.exe
to cut the boost library
Select and so on, no parameters can be compiled successfully.
2. You can find bcp in the bin.v2/tools/bcp/... (and then the folder generated according to your compilation options, such as msvc-9.0/release/link-static/threading-multi) directory. exe. This is the program we need.
3. The use of bcp is simple. Suppose we allow programmers to use four modules such as A, B, C, and D, then we can do this:
bcp --boost: ABCD
Here A, B, C, and D can be:
Boost header file name. Such as: boost/shared_ptr.hpp
Boost library name. For example: header file title of regex
Boost: boost/shared_ptr or shared_ptr
If it is in the boost root directory, the parameter specifying the boost directory can also be omitted.