header-only.rst 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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.Filesystem_
  16. * Boost.IOStreams_
  17. * Boost.ProgramOptions_
  18. * Boost.Python_ (see the `Boost.Python build documentation`__
  19. before building and installing it)
  20. * Boost.Regex_
  21. * Boost.Serialization_
  22. * Boost.Signals_
  23. * Boost.System_
  24. * Boost.Thread_
  25. * Boost.Wave_
  26. __ ../../libs/python/doc/building.html
  27. A few libraries have optional separately-compiled binaries:
  28. * Boost.DateTime_ has a binary component that is only needed if
  29. you're using its ``to_string``\ /\ ``from_string`` or serialization
  30. features, or if you're targeting Visual C++ 6.x or Borland.
  31. * Boost.Graph_ also has a binary component that is only needed if
  32. you intend to `parse GraphViz files`__.
  33. * Boost.Test_ can be used in “header-only” or “separately compiled”
  34. mode, although **separate compilation is recommended for serious
  35. use**.
  36. __ ../../libs/graph/doc/read_graphviz.html
粤ICP备19079148号