The compilation of the boost library is actually very simple. The key is to try it on your own.
Extract the most critical steps from some articles on the internet, add your own practices, and summarize the following text, which is archived here.
========================================================== ==============
Boost compilation steps:
1. Download Code-Official Website: http://www.boost.org
Download the code package from the official website and decompress it to the local directory.
For example, boost_000038_0.zip, decompress it to "E:/boost_000038_0 ".
2. Preparations
Download the boost compiler boost-jam-3.1.17-1-ntx86.zip.
Google it. Http://sourceforge.net/projects/boost
3. Compile
1) Open the "Start" menu, select "run", Enter cmd, enter the console window, and enter the boost installation Source Path E:/boost_000038_0.
2) Enter:
Bjam install -- toolset = Borland -- prefix = "E:/boost_000038_0" Debug -- with-date_time -- With-RegEx
-- Two consecutive minus signs (=) cannot contain spaces. Except for the path, the parameters are all lowercase letters.
-- Toolset indicates that Borland is used for compilation. If compiled with VC, change to -- toolset = msvc
Debug indicates compiling the "debug version ".
-- With specifies the module to be compiled
3): After the carriage return, a large number of strange words are displayed, and the following content is displayed, indicating that the compilation is completed successfully:
... Failed updating 2 targets.
... Skipped 31 targets...
... Updated 341 targets...
4). Release Version
Bjam install -- toolset = Borland -- prefix = "E:/boost_000038_0" release -- with-date_time -- With-RegEx
Changed from "debug" to "release ". Press enter to start the boost library compilation of release.
5). Sometimes you don't know what version of LIB is required by the compiler. You can compile the boost:
Bjam install -- toolset = Borland -- prefix = "E:/boost_000038_0" Debug (or release) -- Build-type = complete
This will compile all the debug and release lib libraries.
6) use of the database
After compilation, the E:/boost_000038_0 directory shows two subdirectories: "include" and "lib". The former stores all boost code files in the form of header files; the latter is all the compiled library files .. DLL,. Lib
7). End
Open c ++ builder2007.
Project-default options-C ++ builder settings. Add the directory where "include/boost-1_38" is located in the include path and add the directory where "lib" is located in the library path.
C ++ options-paths and directories. Same as above.
VC settings are well known, so we won't talk about them.
Additional bjam Parameters
-- Build-Dir = <builddir>: the temporary files compiled are stored in builddir (the files can be deleted after compilation)
-- Stagedir = <stagedir> path for storing compiled library files. The default path is stage.
-- Build-type = complete compile all versions (equivalent to: variant = release, threading = multi; link = shared | static; runtime-link = shared)
Variant = debug | version of release compilation (debug or release ?)
Link = static | use static or dynamic libraries for shared instances.
Threading = single | multi single thread or multi-thread library.
Runtime-link = static | shared determines whether it is a static or dynamic link C/C ++ standard library.
-- With-<library> only compiles the specified library. For example, if you input -- With-RegEx, only the RegEx library is compiled.
-- Show-libraries: displays the name of the library to be compiled.