distro.rst 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  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. The Boost Distribution
  5. ======================
  6. This is a sketch of the resulting directory structure:
  7. .. parsed-literal::
  8. |boost_ver-bold|\ |//| .................\ *The “boost root directory”*
  9. **index.htm** .........\ *A copy of www.boost.org starts here*
  10. **boost**\ |//| .........................\ *All Boost Header files*
  11. |precompiled-dir|
  12. **libs**\ |//| ............\ *Tests, .cpp*\ s\ *, docs, etc., by library*
  13. **index.html** ........\ *Library documentation starts here*
  14. **algorithm**\ |//|
  15. **any**\ |//|
  16. **array**\ |//|
  17. *…more libraries…*
  18. **status**\ |//| .........................\ *Boost-wide test suite*
  19. **tools**\ |//| ...........\ *Utilities, e.g. bjam, quickbook, bcp*
  20. **more**\ |//| ..........................\ *Policy documents, etc.*
  21. **doc**\ |//| ...............\ *A subset of all Boost library docs*
  22. .. sidebar:: Header Organization
  23. .. class:: pre-wrap
  24. The organization of Boost library headers isn't entirely uniform,
  25. but most libraries follow a few patterns:
  26. * Some older libraries and most very small libraries place all
  27. public headers directly into ``boost``\ |/|.
  28. * Most libraries' public headers live in a subdirectory of
  29. ``boost``\ |/|, named after the library. For example, you'll find
  30. the Python library's ``def.hpp`` header in
  31. .. parsed-literal::
  32. ``boost``\ |/|\ ``python``\ |/|\ ``def.hpp``.
  33. * Some libraries have an “aggregate header” in ``boost``\ |/| that
  34. ``#include``\ s all of the library's other headers. For
  35. example, Boost.Python_'s aggregate header is
  36. .. parsed-literal::
  37. ``boost``\ |/|\ ``python.hpp``.
  38. * Most libraries place private headers in a subdirectory called
  39. ``detail``\ |/|, or ``aux_``\ |/|. Don't expect to find
  40. anything you can use in these directories.
  41. It's important to note the following:
  42. .. _Boost root directory:
  43. 1. The path to the **boost root directory** (often |default-root|) is
  44. sometimes referred to as ``$BOOST_ROOT`` in documentation and
  45. mailing lists .
  46. 2. To compile anything in Boost, you need a directory containing
  47. the ``boost``\ |/| subdirectory in your ``#include`` path. |include-paths|
  48. 3. Since all of Boost's header files have the ``.hpp`` extension,
  49. and live in the ``boost``\ |/| subdirectory of the boost root, your
  50. Boost ``#include`` directives will look like:
  51. .. parsed-literal::
  52. #include <boost/\ *whatever*\ .hpp>
  53. or
  54. .. parsed-literal::
  55. #include "boost/\ *whatever*\ .hpp"
  56. depending on your preference regarding the use of angle bracket
  57. includes. |forward-slashes|
  58. 4. Don't be distracted by the ``doc``\ |/| subdirectory; it only
  59. contains a subset of the Boost documentation. Start with
  60. ``libs``\ |/|\ ``index.html`` if you're looking for the whole enchilada.
粤ICP备19079148号