library-naming.rst 3.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  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: |
  31. +=====+==============================================================================+
  32. |``s``|linking statically to the C++ standard library and compiler runtime support |
  33. | |libraries. |
  34. +-----+------------------------------------------------------------------------------+
  35. |``g``|using debug versions of the standard and runtime support libraries. |
  36. +-----+------------------------------------------------------------------------------+
  37. |``y``|using a special `debug build of Python`__. |
  38. +-----+------------------------------------------------------------------------------+
  39. |``d``|building a debug version of your code. [#debug-abi]_ |
  40. +-----+------------------------------------------------------------------------------+
  41. |``p``|using the STLPort standard library rather than the default one supplied with |
  42. | |your compiler. |
  43. +-----+------------------------------------------------------------------------------+
  44. |``n``|using STLPort's deprecated “native iostreams” feature. [#native]_ |
  45. +-----+------------------------------------------------------------------------------+
  46. For example, if you build a debug version of your code for use
  47. with debug versions of the static runtime library and the
  48. STLPort standard library in “native iostreams” mode,
  49. the tag would be: ``-sgdpn``. If none of the above apply, the
  50. ABI tag is ommitted.
  51. ``-1_34``
  52. *Version tag*: the full Boost release number, with periods
  53. replaced by underscores. For example, version 1.31.1 would be
  54. tagged as "-1_31_1".
  55. ``.lib``
  56. *Extension*: determined according to the operating system's usual
  57. convention. On most unix-style platforms the extensions are
  58. ``.a`` and ``.so`` for static libraries (archives) and shared
  59. libraries, respectively. On Windows, ``.dll`` indicates a shared
  60. library and ``.lib`` indicates a
  61. static or import library. Where supported by toolsets on unix
  62. variants, a full version extension is added (e.g. ".so.1.34") and
  63. a symbolic link to the library file, named without the trailing
  64. version number, will also be created.
  65. .. .. _Boost.Build toolset names: toolset-name_
  66. __ ../../libs/python/doc/building.html#variants
粤ICP备19079148号