Compiling the installation
compile Bjam: use the command below to create boost's own build tool Bjam (to ensure that boost is compiled with Bjam on any platform), similar to GNU make.
./bootstrap.sh
./bootstrap.sh--prefix=/home/usrname/boost_1_43_0/boost_install
Boost will be installed in the/boost_install directory, and the unknown prefix will be installed by default to/usr/local/include and/usr/local/lib.
./bjam--help
The. Bjam command is in the format: bjam [Options] [Properties] [Install|stage]
The General Options and attributes (properties) are described with the term "option", which is usually prefixed with the keyword, and the property is not.
--show-libraries
Displays a list of libraries that need to be compiled for use
--build-type=minimal|complete
--build-type=minimal is the default, and at this point you compile only multithreaded static libraries and dynamic libraries that generate the release version of the dynamic-link C run-time library (c + + standard library) under Linux.
& Nbsp; --build-type=complete, under Unix/linux to compile multiple variants (debug or release, multithreaded or single threaded, static or dynamic libraries, static or dynamic link C Runtime library/C + + standard library). It is not recommended to compile all, time consuming space, advocating on-demand compilation.
--layout =versioned|tagged|system
" Span style= "line-height:0px;" > determines the generation strategy for the name of the library and the address directory of the header file that needs to be compiled. The default Windows--layout=versioned,linux under--layout=system.
When compiling multiple versions at the same time, it is best to set--layout=versioned or--layout=tagged, otherwise the compilation will fail because some versions compile at the same time without specifying a naming policy. May cause a naming conflict when outputting to the specified directory.
Span style= "line-height:0px;" > Note: This property is not required when--build-type=complete. However, when specifying attributes such as Variant=debug,release, be sure to--layout=versioned or--layout=tagged.
--build-dir =dir
Specifies the directory for other files, such as intermediate files, target files, etc. generated during compilation, by default in./bin.v2.
--with-
Create and install the specified library
--without-
Do not create and install the specified library, all libraries are created by default
Installation: keyword Install or stage
./bjam Install
Install installs the header file and library file to the appropriate directory, the header file is installed under/usr/local/include, and the library file is installed under/usr/local/lib. Specify the installation directory as described in./bjam--help.
./bjam Stage
The stage can only be said to be a collection of generated library files into a directory, usually the default is under./stage.
Here are the properties:
Toolset=toolset
Specifies the compiler, which is automatically detected by default, and can be used when multiple compilers are installed.
Variant=debug|release
Specifies that the debug or release version be compiled.
Link=static|shared
Specify to create a static library or a dynamic library
Runtime-link=static|shared
Specifies whether the created library is a static link or a dynamic link to the C Run-time library (or C + + standard library), depending on the type of –link, different compiler-allowed linkage strategies, such as under GCC, when generating a dynamic library (–link=shared), Static linking to the C Runtime library (or C + + standard library) is not allowed.
Threading=single|multi
Specifies that you create a multi-threaded or single-threaded version library.
Properties can be set at the same time, in the following two ways, in order to avoid name collisions, it is recommended to take the Propery=value format:
./bjam Variant=debug Variant=release
Last executed creation command (full compile):
./bjam--build-type=complete Stage
Build boost under Linux