library-naming.rst 4.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  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. In order to choose the right binary for your build configuration
  5. you need to know how Boost binaries are named. Each library
  6. filename is composed of a common sequence of elements that describe
  7. how it was built. For example,
  8. ``libboost_regex-vc71-mt-d-1_34.lib`` can be broken down into the
  9. following elements:
  10. ``lib``
  11. *Prefix*: except on Microsoft Windows, every Boost library
  12. name begins with this string. On Windows, only ordinary static
  13. libraries use the ``lib`` prefix; import libraries and DLLs do
  14. not. [#distinct]_
  15. ``boost_regex``
  16. *Library name*: all boost library filenames begin with ``boost_``.
  17. ``-vc71``
  18. *Toolset tag*: identifies the toolset_ and version used to build
  19. the binary.
  20. ``-mt``
  21. *Threading tag*: indicates that the library was
  22. built with multithreading support enabled. Libraries built
  23. without multithreading support can be identified by the absence
  24. of ``-mt``.
  25. ``-d``
  26. *ABI tag*: encodes details that affect the library's
  27. interoperability with other compiled code. For each such
  28. feature, a single letter is added to the tag:
  29. +-----+------------------------------------------------------------------------------+---------------------+
  30. |Key |Use this library when: |Boost.Build option |
  31. +=====+==============================================================================+=====================+
  32. |``s``|linking statically to the C++ standard library and compiler runtime support |runtime-link=static |
  33. | |libraries. | |
  34. +-----+------------------------------------------------------------------------------+---------------------+
  35. |``g``|using debug versions of the standard and runtime support libraries. |runtime-debugging=on |
  36. +-----+------------------------------------------------------------------------------+---------------------+
  37. |``y``|using a special `debug build of Python`__. |python-debugging=on |
  38. +-----+------------------------------------------------------------------------------+---------------------+
  39. |``d``|building a debug version of your code. [#debug-abi]_ |variant=debug |
  40. +-----+------------------------------------------------------------------------------+---------------------+
  41. |``p``|using the STLPort standard library rather than the default one supplied with |stdlib=stlport |
  42. | |your compiler. | |
  43. +-----+------------------------------------------------------------------------------+---------------------+
  44. For example, if you build a debug version of your code for use
  45. with debug versions of the static runtime library and the
  46. STLPort standard library in “native iostreams” mode,
  47. the tag would be: ``-sgdpn``. If none of the above apply, the
  48. ABI tag is ommitted.
  49. ``-1_34``
  50. *Version tag*: the full Boost release number, with periods
  51. replaced by underscores. For example, version 1.31.1 would be
  52. tagged as "-1_31_1".
  53. ``.lib``
  54. *Extension*: determined according to the operating system's usual
  55. convention. On most unix-style platforms the extensions are
  56. ``.a`` and ``.so`` for static libraries (archives) and shared
  57. libraries, respectively. On Windows, ``.dll`` indicates a shared
  58. library and ``.lib`` indicates a
  59. static or import library. Where supported by toolsets on unix
  60. variants, a full version extension is added (e.g. ".so.1.34") and
  61. a symbolic link to the library file, named without the trailing
  62. version number, will also be created.
  63. .. .. _Boost.Build toolset names: toolset-name_
  64. __ ../../libs/python/doc/building.html#variants
粤ICP备19079148号