header-only.rst 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. .. Copyright David Abrahams 2006. Distributed under the Boost
  2. .. Software License, Version 1.0. (See accompanying
  3. .. file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  4. Header-Only Libraries
  5. =====================
  6. The first thing many people want to know is, “how do I build
  7. Boost?” The good news is that often, there's nothing to build.
  8. .. admonition:: Nothing to Build?
  9. Most Boost libraries are **header-only**: they consist *entirely
  10. of header files* containing templates and inline functions, and
  11. require no separately-compiled library binaries or special
  12. treatment when linking.
  13. .. .. _separate:
  14. The only Boost libraries that *must* be built separately are:
  15. * Boost.Chrono_
  16. * Boost.Context_
  17. * Boost.Filesystem_
  18. * Boost.GraphParallel_
  19. * Boost.IOStreams_
  20. * Boost.Locale_
  21. * Boost.Log_ (see `build documentation`__)
  22. * Boost.MPI_
  23. * Boost.ProgramOptions_
  24. * Boost.Python_ (see the `Boost.Python build documentation`__
  25. before building and installing it)
  26. * Boost.Regex_
  27. * Boost.Serialization_
  28. * Boost.Signals_
  29. * Boost.System_
  30. * Boost.Thread_
  31. * Boost.Timer_
  32. * Boost.Wave_
  33. __ ../../libs/log/doc/html/log/installation/config.html
  34. __ ../../libs/python/doc/html/building.html
  35. A few libraries have optional separately-compiled binaries:
  36. * Boost.DateTime_ has a binary component that is only needed if
  37. you're using its ``to_string``\ /\ ``from_string`` or serialization
  38. features, or if you're targeting Visual C++ 6.x or Borland.
  39. * Boost.Graph_ also has a binary component that is only needed if
  40. you intend to `parse GraphViz files`__.
  41. * Boost.Math_ has binary components for the TR1 and C99
  42. cmath functions.
  43. * Boost.Random_ has a binary component which is only needed if
  44. you're using ``random_device``.
  45. * Boost.Test_ can be used in “header-only” or “separately compiled”
  46. mode, although **separate compilation is recommended for serious
  47. use**.
  48. * Boost.Exception_ provides non-intrusive implementation of
  49. exception_ptr for 32-bit _MSC_VER==1310 and _MSC_VER==1400
  50. which requires a separately-compiled binary. This is enabled by
  51. #define BOOST_ENABLE_NON_INTRUSIVE_EXCEPTION_PTR.
  52. __ ../../libs/graph/doc/read_graphviz.html
粤ICP备19079148号