To build Boost, follow the instructions here.
As per your comment, you want to build just a part of Boost (serialization). If you follow the above link, there is a section containing the following advice (wording might vary, I've copied it from the Windows instructions):
For a description of other options you can pass when invoking b2, type:
b2 --help
In particular, to limit the amount of time spent building, you may be interested in:
- reviewing the list of library names with --show-libraries
- limiting which libraries get built with the --with-library-name or --without-library-name options
Typing b2 --show-libraries
yields the following:
The following libraries require building:
- atomic
- chrono
- context
- coroutine
- date_time
- exception
- filesystem
- graph
- graph_parallel
- iostreams
- locale
- log
- math
- mpi
- program_options
- python
- random
- regex
- serialization
- signals
- system
- test
- thread
- timer
- wave
So, to build just serialization, pass the option --with-serialization
to b2
e.g. to build all library types (static/dynamic library, static/dynamic runtime, debug/release, single/multithreading) using VS2013 you could type this:
b2 toolset=msvc-12.0 --with-serialization --build-type=complete stage
Note, if you plan to make use of Boost in future projects, it may be simpler to just build the entire thing (i.e. omitting the --with-serialization
option) so that all libraries are ready to use straight away whenever you need them.