You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: user-guide/modules/ROOT/pages/library-naming.adoc
+43-72Lines changed: 43 additions & 72 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,108 +9,87 @@ Official repository: https://github.com/boostorg/website-v2-docs
9
9
= Library Names and Organization
10
10
:navtitle: Library Names and Organization
11
11
12
+
* <<Introduction>>
13
+
* <<Library Name Elements>>
14
+
* <<Installed Library Names>>
15
+
* <<The Boost Distribution>>
16
+
* <<Footnotes>>
17
+
* <<See Also>>
18
+
19
+
== Introduction
20
+
12
21
If your compiler supports auto-linking, such as Visual C++, then there is no need to understand the details of library binary naming.
13
22
14
23
However, if auto-linking is not supported by your compiler, then, in order to choose the right binary for your build configuration you
15
24
need to know how Boost binaries are named.
16
25
17
26
== Library Name Elements
18
27
19
-
Each library filename is
20
-
composed of a common sequence of elements that describe how it was
21
-
built. For example, `libboost_regex-vc71-mt-d-x86-1_34.lib` can
22
-
be broken down into the following elements:
28
+
Each library filename is composed of a common sequence of elements that describe how it was built. For example, `libboost_regex-vc71-mt-d-x86-1_34.lib` can be broken down into the following elements:
23
29
24
30
[#footnote1-location]
25
-
`lib`::
26
-
_Prefix_: except on Microsoft Windows, every Boost library name begins
27
-
with this string. On Windows, only ordinary static libraries use the
28
-
`lib` prefix; import libraries and DLLs do not. link:#footnote1[(1)]
31
+
* `lib`: _Prefix_: except on Microsoft Windows, every Boost library name begins with this string. On Windows, only ordinary static libraries use the `lib` prefix; import libraries and DLLs do not. link:#footnote1[(1)]
29
32
30
-
`boost_regex`::
31
-
_Library name_: all boost library filenames begin with `boost_`.
33
+
* `boost_regex`: _Library name_: all boost library filenames begin with `boost_`.
32
34
33
-
`-vc71`::
34
-
_Toolset tag_: identifies the xref:header-organization-compilation.adoc#toolset[toolset] and version used to build the binary.
35
+
* `-vc71`: _Toolset tag_: identifies the xref:header-organization-compilation.adoc#toolset[toolset] and version used to build the binary.
35
36
36
-
`-mt`::
37
-
_Threading tag_: indicates that the library was built with
38
-
multithreading support enabled. Libraries built without multithreading
39
-
support can be identified by the absence of `-mt` .
37
+
* `-mt`: _Threading tag_: indicates that the library was built with multithreading support enabled. Libraries built without multithreading support can be identified by the absence of `-mt` .
40
38
41
39
[#footnote2-location]
42
-
`-d`::
43
-
_ABI tag_: encodes details that affect the library's interoperability
44
-
with other compiled code. For each such feature, a single letter is
45
-
added to the tag:
46
-
47
-
[cols="1,5,2",options="header",stripes=even]
40
+
* `-d`: _ABI tag_: encodes details that affect the library's interoperability with other compiled code. For each such feature, a single letter is added to the tag:
|`s` |linking statically to the C++ standard library and compiler
44
+
|Key |Use Case |B2 Option
45
+
|`s` |Linking statically to the C++ standard library and compiler
51
46
runtime support libraries. |`runtime-link=static`
52
-
|`g` |using debug versions of the standard and runtime support
47
+
|`g` |Using debug versions of the standard and runtime support
53
48
libraries. |`runtime-debugging=on`
54
-
|`y` |using a special https://www.boost.org/doc/libs/1_58_0/libs/python/doc/building.html[debug build of Python]. |`python-debugging=on`
55
-
|`d` |building a debug version of your code. link:#footnote2[(2)]
49
+
|`y` |Using a special https://www.boost.org/doc/libs/1_58_0/libs/python/doc/building.html[debug build of Python]. |`python-debugging=on`
50
+
|`d` |Building a debug version of your code. link:#footnote2[(2)]
56
51
|`variant=debug`
57
-
|`p` |using the STLPort standard library rather than the default one
52
+
|`p` |Using the STLPort standard library rather than the default one
58
53
supplied with your compiler. |`stdlib=stlport`
59
54
|===
55
+
+
56
+
For example, if you build a debug version of your code for use with debug versions of the static runtime library and the STLPort standard library, the tag would be: `-sgdp` . If none of the above apply, the ABI tag is omitted.
60
57
61
-
For example, if you build a debug version of your code for use with
62
-
debug versions of the static runtime library and the STLPort standard
63
-
library, the tag would be: `-sgdp` . If none of the above
64
-
apply, the ABI tag is omitted.
65
-
66
-
`-x86`::
67
-
_Architecture and address model tag_: in the first letter, encodes the
_Version tag_: the full Boost release number, with periods replaced by
93
-
underscores. For example, version 1.31.1 would be tagged as `-1_31_1`.
80
+
* `-1_34`: _Version tag_: the full Boost release number, with periods replaced by underscores. For example, version 1.31.1 would be tagged as `-1_31_1`.
94
81
95
-
`.lib`::
96
-
_Extension_: determined according to the operating system's usual
97
-
convention. On most unix-style platforms the extensions are `.a` and
98
-
`.so` for static libraries (archives) and shared libraries,
99
-
respectively. On Windows, `.dll` indicates a shared library and `.lib`
100
-
indicates a static or import library. Where supported by toolsets on
101
-
unix variants, a full version extension is added (e.g. ".so.1.34") and
102
-
a symbolic link to the library file, named without the trailing
103
-
version number, will also be created.
82
+
* `.lib`: _Extension_: determined according to the operating system's usual convention. On most unix-style platforms the extensions are `.a` and `.so` for static libraries (archives) and shared libraries, respectively. On Windows, `.dll` indicates a shared library and `.lib` indicates a static or import library. Where supported by toolsets on unix variants, a full version extension is added (e.g. ".so.1.34") and a symbolic link to the library file, named without the trailing version number, will also be created.
104
83
105
84
== Installed Library Names
106
85
107
86
When libraries are installed using the B2 app, the actual name can vary from the full name described above.
108
87
109
88
The `--layout=<layout>` option determines how the library name is handled, and the appropriate header locations so that multiple versions of Boost, or multiple compilers, can be used on the same system.
|`versioned` | The names of Boost binaries include the Boost version number, name and version of the compiler, and encoded build properties. Boost headers are installed in a subdirectory of `<HDRDIR>` whose name contains the Boost version number. | Windows
115
94
|`tagged` | Names of boost binaries include the encoded build properties such as variant and threading, but do not including compiler name and version, or Boost version. This option is useful if you build several variants of Boost, using the same compiler. | none
116
95
|`system` | Binaries names do not include the Boost version number or the name and version number of the compiler. Boost headers are installed directly into `<HDRDIR>`. This option is intended for system integrators building distribution packages. | Unix
@@ -120,7 +99,7 @@ The `--layout=<layout>` option determines how the library name is handled, and t
120
99
121
100
After installing Boost, this is the resulting directory structure, in the *boost_1_82_0* root:
|*bin.v2*| *libs* | Mainly contains the compiled binaries for those libraries that require compilation.
@@ -131,27 +110,19 @@ After installing Boost, this is the resulting directory structure, in the *boost
131
110
|*stage* | *lib* | CMake files for each library
132
111
|*status*| | Boost-wide test suite
133
112
|*tools* | tool folders |Utilities: B2, quickbook, bcp, etc.
134
-
|b2.exe| | Boost install app, and supporting files
135
-
|index.htm | | A copy of www.boost.org starts here
113
+
|`b2.exe`| | Boost install app, and supporting files
114
+
|`index.htm` | | A copy of www.boost.org starts here
136
115
|===
137
116
138
117
== Footnotes
139
118
140
119
[#footnote1]
141
-
link:#footnote1-location[(1)]::
142
-
This convention distinguishes the static version of a
143
-
Boost library from the import library for an identically-configured
144
-
Boost DLL, which would otherwise have the same name.
120
+
link:#footnote1-location[(1)] This convention distinguishes the static version of a Boost library from the import library for an identically-configured Boost DLL, which would otherwise have the same name.
145
121
146
122
[#footnote2]
147
-
link:#footnote2-location[(2)]::
148
-
These libraries were compiled without optimization or
149
-
inlining, with full debug symbols enabled, and without `#define NDEBUG`. Although it's true that sometimes these choices don't affect
150
-
binary compatibility with other compiled code, you can't count on that
151
-
with Boost libraries.
123
+
link:#footnote2-location[(2)] These libraries were compiled without optimization or inlining, with full debug symbols enabled, and without `#define NDEBUG`. Although it's true that sometimes these choices don't affect binary compatibility with other compiled code, you can't count on that with Boost libraries.
0 commit comments