When I build the boost and record the process to be not forgotten.
Step1: Get Source code
Download the source code from : http://sourceforge.net/projects/boost/files/.
If you unzip the the source code "boost_1_37_0.zip" to the folder "boost/boost_1_37_0" then we name that folder as the $boost_home.
Step2: Build bjam.
Later it will use bjam to build the boost.
The bjam source code are in ( $boost_home/tools/jam/src), you can invoke the build bash script ( $boost_home/tools/jam/src/build.bat)to build it.
After build succeed it will produce 'bjam.exe' the folder ($boost_home/tools/jam/src/bin.ntx86)
Step3: Build the boost library.
3.1 build the all the libarary
bjam --toolset=msvc-9.0 --prefix=$lib-and-dll-out-dir64$ address-model=64 --build-type=complete install
note:
1.the toolset is pecified to msvs-9.0 if vs2009. Other value you can specify depending on your vs version( 2005-msvs-7.0)
2. "address-model=64" specifies the win64
3. " --prefix=$lib-and-dll-out-dir64$" specifies the folder ,that will be install all the library in it
It will cost a lot of disk space and time. I have cost 3 hours and 10G disk to build all the library.
3.2 build the specify libaray
bjam.exe --with-date_time address-model=64 toolset=msvc-9.0 variant=release debug threading=multi stage
note1: "--with-date_time" --> build the "date_time" library. it can be any library you want.
2. "threading=multi" ----> to create the library will support muti-thread. ( the library name will with _mt )
3. The output libaray will in the stage folder.
It just build the specify library, so it save a lot of time and disk space.
Preference:
1. http://www.boost.org/doc/libs/1_40_0/more/getting_started/index.html
2. http://87426628.blog.163.com/blog/static/6069361820098154195922/
library decription from http://blog.csdn.net/JsuFcz/archive/2008/11/14/3301766.aspx
|
||||||||||||
lib |
|
|||||||||||
boost_date_time |
|
|||||||||||
- | gcc |
|
||||||||||
- | mt |
|
||||||||||
- | d |
|
||||||||||
- | 1_31 |
|
||||||||||
.a |