Skip to content

Commit c4a2098

Browse files
authored
Format updates to Library Naming topic (#568)
1 parent ac11ba2 commit c4a2098

File tree

1 file changed

+43
-72
lines changed

1 file changed

+43
-72
lines changed

user-guide/modules/ROOT/pages/library-naming.adoc

Lines changed: 43 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -9,108 +9,87 @@ Official repository: https://github.com/boostorg/website-v2-docs
99
= Library Names and Organization
1010
:navtitle: Library Names and Organization
1111

12+
* <<Introduction>>
13+
* <<Library Name Elements>>
14+
* <<Installed Library Names>>
15+
* <<The Boost Distribution>>
16+
* <<Footnotes>>
17+
* <<See Also>>
18+
19+
== Introduction
20+
1221
If your compiler supports auto-linking, such as Visual C++, then there is no need to understand the details of library binary naming.
1322

1423
However, if auto-linking is not supported by your compiler, then, in order to choose the right binary for your build configuration you
1524
need to know how Boost binaries are named.
1625

1726
== Library Name Elements
1827

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:
2329

2430
[#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)]
2932

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_`.
3234

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.
3536

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` .
4038

4139
[#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:
41+
+
42+
[cols="1,5,2",options="header",stripes=even,frame=none]
4843
|===
49-
|Key |Use this library when: |B2 option
50-
|`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
5146
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
5348
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)]
5651
|`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
5853
supplied with your compiler. |`stdlib=stlport`
5954
|===
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.
6057

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
68-
architecture as follows:
69-
70-
[width="100%",cols="1,3,4",options="header",stripes=even]
58+
* `-x86`: _Architecture and address model tag_: in the first letter, encodes the architecture as follows:
59+
+
60+
[width="100%",cols="1,3,4",options="header",stripes=even,frame=none]
7161
|===
72-
|Key |Architecture |B2 option
62+
|Key |Architecture |B2 Option
7363
|`x` |x86-32, x86-64 | `architecture=x86`
7464
|`a` |ARM |`architecture=arm`
7565
|`i` |IA-64 |`architecture=ia64`
7666
|`s` |Sparc |`architecture=sparc`
7767
|`m` |MIPS/SGI |`architecture=mips*`
7868
|`p` |RS/6000 & PowerPC |`architecture=power`
7969
|===
80-
81-
The two digits following the letter encode the address model as
82-
follows:
83-
84-
[width="100%",cols="1,3,4",options="header",stripes=even]
70+
+
71+
The two digits following the letter encode the address model as follows:
72+
+
73+
[width="100%",cols="1,3,4",options="header",stripes=even,frame=none]
8574
|===
86-
|Key |Address model |B2 option
75+
|Key |Address Model |B2 Option
8776
|`32` |32 bit |`address-model=32`
8877
|`64` |64 bit |`address-model=64`
8978
|===
9079

91-
`-1_34`::
92-
_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`.
9481

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.
10483

10584
== Installed Library Names
10685

10786
When libraries are installed using the B2 app, the actual name can vary from the full name described above.
10887

10988
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.
11089

111-
[cols="1,3,1",options="header",stripes=even]
90+
[cols="1,3,1",options="header",stripes=even,frame=none]
11291
|===
113-
|Layout |Description | Default on
92+
|Layout |Description | Default On
11493
|`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
11594
|`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
11695
|`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
12099

121100
After installing Boost, this is the resulting directory structure, in the *boost_1_82_0* root:
122101

123-
[cols="1,1,4",options="header",stripes=even]
102+
[cols="1,1,4",options="header",stripes=even,frame=none]
124103
|===
125104
|Root Level |Lower Level | Description
126105
|*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
131110
|*stage* | *lib* | CMake files for each library
132111
|*status*| | Boost-wide test suite
133112
|*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
136115
|===
137116

138117
== Footnotes
139118

140119
[#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.
145121

146122
[#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.
152124

153125
== See Also
154126

155-
[square]
156127
* xref:header-organization-compilation.adoc[]
157128

0 commit comments

Comments
 (0)