Compare commits

..

23 Commits

Author SHA1 Message Date
Ion Gaztañaga
035a84e967 Update Getting Started for 1.93.0 2026-08-13 01:25:13 +02:00
Marshall Clow
e1b58c69c2 Bump version to 1.92.0 2026-04-22 11:22:28 -07:00
Marshall Clow
85b6cf253e Bump to 1.91 2025-12-10 14:14:27 -08:00
Marshall Clow
39633d9f60 Bump version to 1.89 2025-04-13 09:03:53 -07:00
Marshall Clow
b3477f54d8 Update release vars to 1.88 2024-12-12 07:12:14 -08:00
Marshall Clow
1cde07b3d7 Bump version vars to 1.87.0 2024-08-14 10:06:29 -07:00
Marshall Clow
5c395211d6 Bump version to 1.86.0 2024-04-15 11:55:33 -07:00
Marshall Clow
2a7ac37256 Bump version to 1.85.0 2023-12-14 14:03:44 -08:00
Marshall Clow
80f38948ab Version 1.84.0 2023-08-11 10:14:22 -07:00
Marshall Clow
748504c510 Bump version to 1.83.0 2023-04-14 16:58:00 -07:00
Glen Fernandes
f51f30728a Regenerate after RST changes 2022-12-14 20:19:41 -05:00
Glen Fernandes
fc705aefc2 Bump versions to 1.82 2022-12-14 19:58:16 -05:00
Glen Fernandes
3f58b37f6f Regenerate after RST changes 2022-08-10 23:52:20 -04:00
Glen Fernandes
613c712508 Bump versions to 1.81 2022-08-10 23:34:30 -04:00
Glen Fernandes
631827729b Regenerate after RST changes 2022-04-13 22:16:11 -04:00
Glen Fernandes
cbbd4179e6 Bump versions to 1.80 2022-04-13 21:33:40 -04:00
Glen Fernandes
8333cb17a8 Regenerate after RST changes 2021-12-28 22:05:22 -05:00
Marshall Clow
c4df659b3d Bump version to 1.79 2021-12-08 07:00:31 -08:00
Marshall Clow
64ce374994 Bump version to 1.78 2021-08-11 08:44:19 -07:00
Glen Fernandes
863cc8eb27 Bump versions to 1.77 and regenerate 2021-04-16 22:11:44 -04:00
Rene Rivera
422ad51772 Fix reference to B2, both text and links.
This updates the getting started docs to refer to the canonical B2 name.
Also updates all the links to B2 documentation to point to the local
tools/build sourced location. Hence making those links work in both
off-line and on-line (versioned) versions of this documentation.
2021-03-08 18:35:46 -05:00
Glen Fernandes
b3dfe6529a Bump versions to 1.76.0 and regenerate 2020-12-11 23:28:00 -05:00
Marshall Clow
721c25d1a5 Bump version to 1.75.0 2020-08-14 09:30:21 -07:00
8 changed files with 196 additions and 200 deletions

View File

@@ -15,7 +15,7 @@ install it. To do this:
the directory where you want Boost.Build to be installed the directory where you want Boost.Build to be installed
4. Add *PREFIX*\ |/|\ ``bin`` to your PATH environment variable. 4. Add *PREFIX*\ |/|\ ``bin`` to your PATH environment variable.
.. _Boost.Build: ../../tools/build/index.html .. _Boost.Build: ../../tools/build/doc/html/index.html
.. _Boost.Build documentation: Boost.Build_ .. _Boost.Build documentation: Boost.Build_
.. _toolset: .. _toolset:
@@ -28,13 +28,13 @@ First, find the toolset corresponding to your compiler in the
following table (an up-to-date list is always available `in the following table (an up-to-date list is always available `in the
Boost.Build documentation`__). Boost.Build documentation`__).
__ https://boostorg.github.io/build/manual/develop/index.html#bbv2.reference.tools __ ../../tools/build/doc/html/index.html#bbv2.reference.tools
.. Note:: If you previously chose a toolset for the purposes of .. Note:: If you previously chose a toolset for the purposes of
`building b2`_, you should assume it won't work and instead `building b2`_, you should assume it won't work and instead
choose newly from the table below. choose newly from the table below.
.. _building b2: ../../doc/html/bbv2/installation.html .. _building b2: ../../tools/build/doc/html/index.html#bbv2.installation
+-----------+--------------------+------------------------------------------------------------+ +-----------+--------------------+------------------------------------------------------------+
|Toolset |Vendor |Notes | |Toolset |Vendor |Notes |
@@ -109,5 +109,5 @@ invoke ``b2`` as follows:
For a complete description of these and other invocation options, For a complete description of these and other invocation options,
please see the `Boost.Build documentation`__. please see the `Boost.Build documentation`__.
__ http://www.boost.org/build/doc/html/bbv2/overview/invocation.html __ ../../tools/build/doc/html/index.html#bbv2.overview.invocation

View File

@@ -68,6 +68,6 @@ If it seems like the build system can't find your compiler and/or
linker, consider setting up a ``user-config.jam`` file as described linker, consider setting up a ``user-config.jam`` file as described
`here`__. If that isn't your problem or the ``user-config.jam`` file `here`__. If that isn't your problem or the ``user-config.jam`` file
doesn't work for you, please address questions about configuring Boost doesn't work for you, please address questions about configuring Boost
for your compiler to the `Boost.Build mailing list`_. for your compiler to the `Boost Users' mailing list`_.
__ http://www.boost.org/build/doc/html/bbv2/overview/configuration.html __ ../../tools/build/doc/html/index.html#bbv2.overview.configuration

View File

@@ -16,7 +16,6 @@ mailing list`_.
* `Boost.Build reference manual`_ * `Boost.Build reference manual`_
* `Boost Users' mailing list`_ * `Boost Users' mailing list`_
* `Boost.Build mailing list`_
* `Index of all Boost library documentation`_ * `Index of all Boost library documentation`_
.. _Index of all Boost library documentation: ../../libs/index.html .. _Index of all Boost library documentation: ../../libs/index.html
@@ -29,7 +28,6 @@ mailing list`_.
-- the Boost Developers -- the Boost Developers
.. _Boost.Build reference manual: ../../tools/build/index.html .. _Boost.Build reference manual: ../../tools/build/doc/html/index.html
.. _Boost Users' mailing list: http://www.boost.org/more/mailing_lists.htm#users .. _Boost Users' mailing list: http://www.boost.org/more/mailing_lists.htm#users
.. _Boost.Build mailing list: http://www.boost.org/more/mailing_lists.htm#jamboost

View File

@@ -5,8 +5,8 @@
.. This file contains all the definitions that need to be updated .. This file contains all the definitions that need to be updated
.. for each new release of Boost. .. for each new release of Boost.
.. |boost-version-number| replace:: 74 .. |boost-version-number| replace:: 93
.. |boost_ver| replace:: ``boost_1_74_0`` .. |boost_ver| replace:: ``boost_1_93_0``
.. |boost_ver-bold| replace:: **boost_1_74_0** .. |boost_ver-bold| replace:: **boost_1_93_0**
.. _sf-download: http://www.boost.org/users/history/version_1_74_0.html .. _sf-download: http://www.boost.org/users/history/version_1_93_0.html

View File

@@ -1,20 +1,20 @@
<?xml version="1.0" encoding="utf-8" ?> <?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" /> <meta name="generator" content="Docutils 0.22.4: https://docutils.sourceforge.io/" />
<title>Boost Getting Started</title> <title>Boost Getting Started</title>
<link rel="stylesheet" href="../../rst.css" type="text/css" /> <link rel="stylesheet" href="../../rst.css" type="text/css" />
</head> </head>
<body> <body>
<div class="document" id="logo-getting-started"> <div class="document" id="logo-getting-started">
<h1 class="title"><a class="reference external" href="../../index.htm"><img alt="Boost" class="boost-logo" src="../../boost.png" /></a> Getting Started</h1> <h1 class="title"><a class="reference external image-reference" href="../../index.htm"><img alt="Boost" class="boost-logo" src="../../boost.png" /></a> Getting Started</h1>
<!-- Copyright David Abrahams 2006. Distributed under the Boost --> <!-- Copyright David Abrahams 2006. Distributed under the Boost -->
<!-- Software License, Version 1.0. (See accompanying --> <!-- Software License, Version 1.0. (See accompanying -->
<!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) --> <!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -->
<div class="admonition-use-the-latest-version-of-this-getting-started-guide admonition"> <div class="admonition admonition-use-the-latest-version-of-this-getting-started-guide">
<p class="first admonition-title">Use the latest version of this Getting Started guide</p> <p class="first admonition-title">Use the latest version of this Getting Started guide</p>
<p class="last">The <a class="reference external" href="http://www.boost.org/more/getting_started/index.html">Boost website version of this Getting Started guide</a> may <p class="last">The <a class="reference external" href="http://www.boost.org/more/getting_started/index.html">Boost website version of this Getting Started guide</a> may
have updated information, such as the location of additional installers have updated information, such as the location of additional installers

View File

@@ -1,16 +1,16 @@
<?xml version="1.0" encoding="utf-8" ?> <?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" /> <meta name="generator" content="Docutils 0.22.4: https://docutils.sourceforge.io/" />
<title>Boost Getting Started on Unix Variants</title>
<meta content="Getting Started with Boost on Unix Variants (including Linux and MacOS)" name="description" /> <meta content="Getting Started with Boost on Unix Variants (including Linux and MacOS)" name="description" />
<title>Boost Getting Started on Unix Variants</title>
<link rel="stylesheet" href="../../rst.css" type="text/css" /> <link rel="stylesheet" href="../../rst.css" type="text/css" />
</head> </head>
<body> <body>
<div class="document" id="logo-getting-started-on-unix-variants"> <div class="document" id="logo-getting-started-on-unix-variants">
<h1 class="title"><a class="reference external" href="../../index.htm"><img alt="Boost" class="boost-logo" src="../../boost.png" /></a> Getting Started on Unix Variants</h1> <h1 class="title"><a class="reference external image-reference" href="../../index.htm"><img alt="Boost" class="boost-logo" src="../../boost.png" /></a> Getting Started on Unix Variants</h1>
<!-- Copyright David Abrahams 2006. Distributed under the Boost --> <!-- Copyright David Abrahams 2006. Distributed under the Boost -->
<!-- Software License, Version 1.0. (See accompanying --> <!-- Software License, Version 1.0. (See accompanying -->
@@ -28,73 +28,73 @@
.. _Cygwin: http://www.cygwin.com .. _Cygwin: http://www.cygwin.com
.. _MinGW: http://mingw.org --> .. _MinGW: http://mingw.org -->
<div class="contents topic" id="index"> <div class="contents topic" id="index">
<p class="topic-title first">Index</p> <p class="topic-title"><a class="reference internal" href="#top">Index</a></p>
<ul class="auto-toc simple"> <ul class="auto-toc simple">
<li><a class="reference internal" href="#get-boost" id="id20">1&nbsp;&nbsp;&nbsp;Get Boost</a></li> <li><a class="reference internal" href="#get-boost" id="toc-entry-1">1&nbsp;&nbsp;&nbsp;Get Boost</a></li>
<li><a class="reference internal" href="#the-boost-distribution" id="id21">2&nbsp;&nbsp;&nbsp;The Boost Distribution</a></li> <li><a class="reference internal" href="#the-boost-distribution" id="toc-entry-2">2&nbsp;&nbsp;&nbsp;The Boost Distribution</a></li>
<li><a class="reference internal" href="#header-only-libraries" id="id22">3&nbsp;&nbsp;&nbsp;Header-Only Libraries</a></li> <li><a class="reference internal" href="#header-only-libraries" id="toc-entry-3">3&nbsp;&nbsp;&nbsp;Header-Only Libraries</a></li>
<li><a class="reference internal" href="#build-a-simple-program-using-boost" id="id23">4&nbsp;&nbsp;&nbsp;Build a Simple Program Using Boost</a><ul class="auto-toc"> <li><a class="reference internal" href="#build-a-simple-program-using-boost" id="toc-entry-4">4&nbsp;&nbsp;&nbsp;Build a Simple Program Using Boost</a><ul class="auto-toc">
<li><a class="reference internal" href="#errors-and-warnings" id="id24">4.1&nbsp;&nbsp;&nbsp;Errors and Warnings</a></li> <li><a class="reference internal" href="#errors-and-warnings" id="toc-entry-5">4.1&nbsp;&nbsp;&nbsp;Errors and Warnings</a></li>
</ul> </ul>
</li> </li>
<li><a class="reference internal" href="#prepare-to-use-a-boost-library-binary" id="id25">5&nbsp;&nbsp;&nbsp;Prepare to Use a Boost Library Binary</a><ul class="auto-toc"> <li><a class="reference internal" href="#prepare-to-use-a-boost-library-binary" id="toc-entry-6">5&nbsp;&nbsp;&nbsp;Prepare to Use a Boost Library Binary</a><ul class="auto-toc">
<li><a class="reference internal" href="#easy-build-and-install" id="id26">5.1&nbsp;&nbsp;&nbsp;Easy Build and Install</a></li> <li><a class="reference internal" href="#easy-build-and-install" id="toc-entry-7">5.1&nbsp;&nbsp;&nbsp;Easy Build and Install</a></li>
<li><a class="reference internal" href="#or-build-custom-binaries" id="id27">5.2&nbsp;&nbsp;&nbsp;Or, Build Custom Binaries</a><ul class="auto-toc"> <li><a class="reference internal" href="#or-build-custom-binaries" id="toc-entry-8">5.2&nbsp;&nbsp;&nbsp;Or, Build Custom Binaries</a><ul class="auto-toc">
<li><a class="reference internal" href="#install-boost-build" id="id28">5.2.1&nbsp;&nbsp;&nbsp;Install Boost.Build</a></li> <li><a class="reference internal" href="#install-boost-build" id="toc-entry-9">5.2.1&nbsp;&nbsp;&nbsp;Install Boost.Build</a></li>
<li><a class="reference internal" href="#identify-your-toolset" id="id29">5.2.2&nbsp;&nbsp;&nbsp;Identify Your Toolset</a></li> <li><a class="reference internal" href="#identify-your-toolset" id="toc-entry-10">5.2.2&nbsp;&nbsp;&nbsp;Identify Your Toolset</a></li>
<li><a class="reference internal" href="#select-a-build-directory" id="id30">5.2.3&nbsp;&nbsp;&nbsp;Select a Build Directory</a></li> <li><a class="reference internal" href="#select-a-build-directory" id="toc-entry-11">5.2.3&nbsp;&nbsp;&nbsp;Select a Build Directory</a></li>
<li><a class="reference internal" href="#invoke-b2" id="id31">5.2.4&nbsp;&nbsp;&nbsp;Invoke <tt class="docutils literal">b2</tt></a></li> <li><a class="reference internal" href="#invoke-b2" id="toc-entry-12">5.2.4&nbsp;&nbsp;&nbsp;Invoke <tt class="docutils literal">b2</tt></a></li>
</ul> </ul>
</li> </li>
<li><a class="reference internal" href="#expected-build-output" id="id32">5.3&nbsp;&nbsp;&nbsp;Expected Build Output</a></li> <li><a class="reference internal" href="#expected-build-output" id="toc-entry-13">5.3&nbsp;&nbsp;&nbsp;Expected Build Output</a></li>
<li><a class="reference internal" href="#in-case-of-build-errors" id="id33">5.4&nbsp;&nbsp;&nbsp;In Case of Build Errors</a></li> <li><a class="reference internal" href="#in-case-of-build-errors" id="toc-entry-14">5.4&nbsp;&nbsp;&nbsp;In Case of Build Errors</a></li>
</ul> </ul>
</li> </li>
<li><a class="reference internal" href="#link-your-program-to-a-boost-library" id="id34">6&nbsp;&nbsp;&nbsp;Link Your Program to a Boost Library</a><ul class="auto-toc"> <li><a class="reference internal" href="#link-your-program-to-a-boost-library" id="toc-entry-15">6&nbsp;&nbsp;&nbsp;Link Your Program to a Boost Library</a><ul class="auto-toc">
<li><a class="reference internal" href="#library-naming" id="id35">6.1&nbsp;&nbsp;&nbsp;Library Naming</a></li> <li><a class="reference internal" href="#library-naming" id="toc-entry-16">6.1&nbsp;&nbsp;&nbsp;Library Naming</a></li>
<li><a class="reference internal" href="#test-your-program" id="id36">6.2&nbsp;&nbsp;&nbsp;Test Your Program</a></li> <li><a class="reference internal" href="#test-your-program" id="toc-entry-17">6.2&nbsp;&nbsp;&nbsp;Test Your Program</a></li>
</ul> </ul>
</li> </li>
<li><a class="reference internal" href="#conclusion-and-further-resources" id="id37">7&nbsp;&nbsp;&nbsp;Conclusion and Further Resources</a></li> <li><a class="reference internal" href="#conclusion-and-further-resources" id="toc-entry-18">7&nbsp;&nbsp;&nbsp;Conclusion and Further Resources</a></li>
</ul> </ul>
</div> </div>
<div class="section" id="get-boost"> <div class="section" id="get-boost">
<h1><a class="toc-backref" href="#id20">1&nbsp;&nbsp;&nbsp;Get Boost</a></h1> <h1><a class="toc-backref" href="#toc-entry-1">1&nbsp;&nbsp;&nbsp;Get Boost</a></h1>
<p>The most reliable way to get a copy of Boost is to download a <p>The most reliable way to get a copy of Boost is to download a
distribution from <a class="reference external" href="http://www.boost.org/users/history/version_1_73_0.html">SourceForge</a>:</p> distribution from <a class="reference external" href="http://www.boost.org/users/history/version_1_93_0.html">SourceForge</a>:</p>
<ol class="arabic"> <ol class="arabic">
<li><p class="first">Download <a class="reference external" href="http://www.boost.org/users/history/version_1_73_0.html"><tt class="docutils literal">boost_1_73_0</tt><tt class="docutils literal">.tar.bz2</tt></a>.</p> <li><p class="first">Download <a class="reference external" href="http://www.boost.org/users/history/version_1_93_0.html"><tt class="docutils literal">boost_1_93_0</tt><tt class="docutils literal">.tar.bz2</tt></a>.</p>
</li> </li>
<li><p class="first">In the directory where you want to put the Boost installation, <li><p class="first">In the directory where you want to put the Boost installation,
execute</p> execute</p>
<pre class="literal-block"> <pre class="literal-block">
tar --bzip2 -xf <em>/path/to/</em><tt class="docutils literal">boost_1_73_0</tt>.tar.bz2 tar --bzip2 -xf <em>/path/to/</em><tt class="docutils literal">boost_1_93_0</tt>.tar.bz2
</pre> </pre>
</li> </li>
</ol> </ol>
<div class="admonition-other-packages admonition"> <div class="admonition admonition-other-packages">
<p class="first admonition-title">Other Packages</p> <p class="first admonition-title">Other Packages</p>
<p class="last">RedHat, Debian, and other distribution packagers supply Boost <p class="last">RedHat, Debian, and other distribution packagers supply Boost
library packages, however you may need to adapt these library packages, however you may need to adapt these
instructions if you use third-party packages, because their instructions if you use third-party packages, because their
creators usually choose to break Boost up into several packages, creators usually choose to break Boost up into several packages,
reorganize the directory structure of the Boost distribution, reorganize the directory structure of the Boost distribution,
and/or rename the library binaries.<a class="footnote-reference" href="#packagers" id="id2"><sup>1</sup></a> If you have and/or rename the library binaries.<a class="footnote-reference" href="#packagers" id="footnote-reference-1"><sup>1</sup></a> If you have
any trouble, we suggest using an official Boost distribution any trouble, we suggest using an official Boost distribution
from <a class="reference external" href="http://www.boost.org/users/history/version_1_73_0.html">SourceForge</a>.</p> from <a class="reference external" href="http://www.boost.org/users/history/version_1_93_0.html">SourceForge</a>.</p>
</div> </div>
<!-- Copyright David Abrahams 2006. Distributed under the Boost --> <!-- Copyright David Abrahams 2006. Distributed under the Boost -->
<!-- Software License, Version 1.0. (See accompanying --> <!-- Software License, Version 1.0. (See accompanying -->
<!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) --> <!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -->
</div> </div>
<div class="section" id="the-boost-distribution"> <div class="section" id="the-boost-distribution">
<h1><a class="toc-backref" href="#id21">2&nbsp;&nbsp;&nbsp;The Boost Distribution</a></h1> <h1><a class="toc-backref" href="#toc-entry-2">2&nbsp;&nbsp;&nbsp;The Boost Distribution</a></h1>
<p>This is a sketch of the resulting directory structure:</p> <p>This is a sketch of the resulting directory structure:</p>
<pre class="literal-block"> <pre class="literal-block">
<strong>boost_1_73_0</strong><strong>/</strong> .................<em>The “boost root directory”</em> <strong>boost_1_93_0</strong><strong>/</strong> .................<em>The “boost root directory”</em>
<strong>index.htm</strong> .........<em>A copy of www.boost.org starts here</em> <strong>index.htm</strong> .........<em>A copy of www.boost.org starts here</em>
<strong>boost</strong><strong>/</strong> .........................<em>All Boost Header files</em> <strong>boost</strong><strong>/</strong> .........................<em>All Boost Header files</em>
<tt class="docutils literal"> </tt> ``&nbsp;``
<strong>libs</strong><strong>/</strong> ............<em>Tests, .cpp</em>s<em>, docs, etc., by library</em> <strong>libs</strong><strong>/</strong> ............<em>Tests, .cpp</em>s<em>, docs, etc., by library</em>
<strong>index.html</strong> ........<em>Library documentation starts here</em> <strong>index.html</strong> ........<em>Library documentation starts here</em>
<strong>algorithm</strong><strong>/</strong> <strong>algorithm</strong><strong>/</strong>
@@ -136,12 +136,12 @@ anything you can use in these directories.</p>
</div> </div>
<p>It's important to note the following:</p> <p>It's important to note the following:</p>
<ol class="arabic" id="boost-root-directory"> <ol class="arabic" id="boost-root-directory">
<li><p class="first">The path to the <strong>boost root directory</strong> (often <tt class="docutils literal">/usr/local/</tt><tt class="docutils literal">boost_1_73_0</tt>) is <li><p class="first">The path to the <strong>boost root directory</strong> (often <tt class="docutils literal">/usr/local/</tt><tt class="docutils literal">boost_1_93_0</tt>) is
sometimes referred to as <tt class="docutils literal">$BOOST_ROOT</tt> in documentation and sometimes referred to as <tt class="docutils literal">$BOOST_ROOT</tt> in documentation and
mailing lists .</p> mailing lists .</p>
</li> </li>
<li><p class="first">To compile anything in Boost, you need a directory containing <li><p class="first">To compile anything in Boost, you need a directory containing
the <tt class="docutils literal">boost</tt><tt class="docutils literal">/</tt> subdirectory in your <tt class="docutils literal">#include</tt> path. <tt class="docutils literal"> </tt></p> the <tt class="docutils literal">boost</tt><tt class="docutils literal">/</tt> subdirectory in your <tt class="docutils literal">#include</tt> path. ``&nbsp;``</p>
</li> </li>
<li><p class="first">Since all of Boost's header files have the <tt class="docutils literal">.hpp</tt> extension, <li><p class="first">Since all of Boost's header files have the <tt class="docutils literal">.hpp</tt> extension,
and live in the <tt class="docutils literal">boost</tt><tt class="docutils literal">/</tt> subdirectory of the boost root, your and live in the <tt class="docutils literal">boost</tt><tt class="docutils literal">/</tt> subdirectory of the boost root, your
@@ -154,7 +154,7 @@ Boost <tt class="docutils literal">#include</tt> directives will look like:</p>
#include &quot;boost/<em>whatever</em>.hpp&quot; #include &quot;boost/<em>whatever</em>.hpp&quot;
</pre> </pre>
<p>depending on your preference regarding the use of angle bracket <p>depending on your preference regarding the use of angle bracket
includes. <tt class="docutils literal"> </tt></p> includes. ``&nbsp;``</p>
</li> </li>
<li><p class="first">Don't be distracted by the <tt class="docutils literal">doc</tt><tt class="docutils literal">/</tt> subdirectory; it only <li><p class="first">Don't be distracted by the <tt class="docutils literal">doc</tt><tt class="docutils literal">/</tt> subdirectory; it only
contains a subset of the Boost documentation. Start with contains a subset of the Boost documentation. Start with
@@ -166,10 +166,10 @@ contains a subset of the Boost documentation. Start with
<!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) --> <!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -->
</div> </div>
<div class="section" id="header-only-libraries"> <div class="section" id="header-only-libraries">
<h1><a class="toc-backref" href="#id22">3&nbsp;&nbsp;&nbsp;Header-Only Libraries</a></h1> <h1><a class="toc-backref" href="#toc-entry-3">3&nbsp;&nbsp;&nbsp;Header-Only Libraries</a></h1>
<p>The first thing many people want to know is, “how do I build <p>The first thing many people want to know is, “how do I build
Boost?” The good news is that often, there's nothing to build.</p> Boost?” The good news is that often, there's nothing to build.</p>
<div class="admonition-nothing-to-build admonition"> <div class="admonition admonition-nothing-to-build">
<p class="first admonition-title">Nothing to Build?</p> <p class="first admonition-title">Nothing to Build?</p>
<p class="last">Most Boost libraries are <strong>header-only</strong>: they consist <em>entirely <p class="last">Most Boost libraries are <strong>header-only</strong>: they consist <em>entirely
of header files</em> containing templates and inline functions, and of header files</em> containing templates and inline functions, and
@@ -220,7 +220,7 @@ necessary.</li>
<!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) --> <!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -->
</div> </div>
<div class="section" id="build-a-simple-program-using-boost"> <div class="section" id="build-a-simple-program-using-boost">
<h1><a class="toc-backref" href="#id23">4&nbsp;&nbsp;&nbsp;Build a Simple Program Using Boost</a></h1> <h1><a class="toc-backref" href="#toc-entry-4">4&nbsp;&nbsp;&nbsp;Build a Simple Program Using Boost</a></h1>
<p>To keep things simple, let's start by using a header-only library. <p>To keep things simple, let's start by using a header-only library.
The following program reads a sequence of integers from standard The following program reads a sequence of integers from standard
input, uses Boost.Lambda to multiply each number by three, and input, uses Boost.Lambda to multiply each number by three, and
@@ -244,7 +244,7 @@ int main()
<p>Now, in the directory where you saved <tt class="docutils literal">example.cpp</tt>, issue the <p>Now, in the directory where you saved <tt class="docutils literal">example.cpp</tt>, issue the
following command:</p> following command:</p>
<pre class="literal-block"> <pre class="literal-block">
c++ -I <em>path/to/</em><tt class="docutils literal">boost_1_73_0</tt> example.cpp -o example c++ -I <em>path/to/</em><tt class="docutils literal">boost_1_93_0</tt> example.cpp -o example
</pre> </pre>
<p>To test the result, type:</p> <p>To test the result, type:</p>
<pre class="literal-block"> <pre class="literal-block">
@@ -254,10 +254,10 @@ echo 1 2 3 | ./example
<!-- Software License, Version 1.0. (See accompanying --> <!-- Software License, Version 1.0. (See accompanying -->
<!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) --> <!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -->
<div class="section" id="errors-and-warnings"> <div class="section" id="errors-and-warnings">
<h2><a class="toc-backref" href="#id24">4.1&nbsp;&nbsp;&nbsp;Errors and Warnings</a></h2> <h2><a class="toc-backref" href="#toc-entry-5">4.1&nbsp;&nbsp;&nbsp;Errors and Warnings</a></h2>
<p>Don't be alarmed if you see compiler warnings originating in Boost <p>Don't be alarmed if you see compiler warnings originating in Boost
headers. We try to eliminate them, but doing so isn't always headers. We try to eliminate them, but doing so isn't always
practical.<a class="footnote-reference" href="#warnings" id="id6"><sup>3</sup></a> <strong>Errors are another matter</strong>. If you're practical.<a class="footnote-reference" href="#warnings" id="footnote-reference-2"><sup>3</sup></a> <strong>Errors are another matter</strong>. If you're
seeing compilation errors at this point in the tutorial, check to seeing compilation errors at this point in the tutorial, check to
be sure you've copied the <a class="reference internal" href="#build-a-simple-program-using-boost">example program</a> correctly and that you've be sure you've copied the <a class="reference internal" href="#build-a-simple-program-using-boost">example program</a> correctly and that you've
correctly identified the <a class="reference internal" href="#boost-root-directory">Boost root directory</a>.</p> correctly identified the <a class="reference internal" href="#boost-root-directory">Boost root directory</a>.</p>
@@ -267,15 +267,15 @@ correctly identified the <a class="reference internal" href="#boost-root-directo
</div> </div>
</div> </div>
<div class="section" id="prepare-to-use-a-boost-library-binary"> <div class="section" id="prepare-to-use-a-boost-library-binary">
<h1><a class="toc-backref" href="#id25">5&nbsp;&nbsp;&nbsp;Prepare to Use a Boost Library Binary</a></h1> <h1><a class="toc-backref" href="#toc-entry-6">5&nbsp;&nbsp;&nbsp;Prepare to Use a Boost Library Binary</a></h1>
<p>If you want to use any of the separately-compiled Boost libraries, <p>If you want to use any of the separately-compiled Boost libraries,
you'll need to acquire library binaries.</p> you'll need to acquire library binaries.</p>
<div class="section" id="easy-build-and-install"> <div class="section" id="easy-build-and-install">
<h2><a class="toc-backref" href="#id26">5.1&nbsp;&nbsp;&nbsp;Easy Build and Install</a></h2> <h2><a class="toc-backref" href="#toc-entry-7">5.1&nbsp;&nbsp;&nbsp;Easy Build and Install</a></h2>
<p>Issue the following commands in the shell (don't type <tt class="docutils literal">$</tt>; that <p>Issue the following commands in the shell (don't type <tt class="docutils literal">$</tt>; that
represents the shell's prompt):</p> represents the shell's prompt):</p>
<pre class="literal-block"> <pre class="literal-block">
<strong>$</strong> cd <em>path/to/</em><tt class="docutils literal">boost_1_73_0</tt> <strong>$</strong> cd <em>path/to/</em><tt class="docutils literal">boost_1_93_0</tt>
<strong>$</strong> ./bootstrap.sh --help <strong>$</strong> ./bootstrap.sh --help
</pre> </pre>
<p>Select your configuration options and invoke <tt class="docutils literal">./bootstrap.sh</tt> again <p>Select your configuration options and invoke <tt class="docutils literal">./bootstrap.sh</tt> again
@@ -299,18 +299,18 @@ path in place of the Boost root directory.</p>
<p><a class="reference internal" href="#link-your-program-to-a-boost-library"><em>skip to the next step</em></a></p> <p><a class="reference internal" href="#link-your-program-to-a-boost-library"><em>skip to the next step</em></a></p>
</div> </div>
<div class="section" id="or-build-custom-binaries"> <div class="section" id="or-build-custom-binaries">
<h2><a class="toc-backref" href="#id27">5.2&nbsp;&nbsp;&nbsp;Or, Build Custom Binaries</a></h2> <h2><a class="toc-backref" href="#toc-entry-8">5.2&nbsp;&nbsp;&nbsp;Or, Build Custom Binaries</a></h2>
<p>If you're using a compiler other than your system's default, you'll <p>If you're using a compiler other than your system's default, you'll
need to use <a class="reference external" href="../../tools/build/index.html">Boost.Build</a> to create binaries.</p> need to use <a class="reference external" href="../../tools/build/doc/html/index.html">Boost.Build</a> to create binaries.</p>
<p>You'll also <p>You'll also
use this method if you need a nonstandard build variant (see the use this method if you need a nonstandard build variant (see the
<a class="reference external" href="../../tools/build/index.html">Boost.Build documentation</a> for more details).</p> <a class="reference external" href="../../tools/build/doc/html/index.html">Boost.Build documentation</a> for more details).</p>
<!-- Copyright David Abrahams 2006. Distributed under the Boost --> <!-- Copyright David Abrahams 2006. Distributed under the Boost -->
<!-- Software License, Version 1.0. (See accompanying --> <!-- Software License, Version 1.0. (See accompanying -->
<!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) --> <!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -->
<div class="section" id="install-boost-build"> <div class="section" id="install-boost-build">
<h3><a class="toc-backref" href="#id28">5.2.1&nbsp;&nbsp;&nbsp;Install Boost.Build</a></h3> <h3><a class="toc-backref" href="#toc-entry-9">5.2.1&nbsp;&nbsp;&nbsp;Install Boost.Build</a></h3>
<p><a class="reference external" href="../../tools/build/index.html">Boost.Build</a> is a text-based system for developing, testing, and <p><a class="reference external" href="../../tools/build/doc/html/index.html">Boost.Build</a> is a text-based system for developing, testing, and
installing software. First, you'll need to build and installing software. First, you'll need to build and
install it. To do this:</p> install it. To do this:</p>
<ol class="arabic simple"> <ol class="arabic simple">
@@ -322,14 +322,14 @@ the directory where you want Boost.Build to be installed</li>
</ol> </ol>
</div> </div>
<div class="section" id="identify-your-toolset"> <div class="section" id="identify-your-toolset">
<span id="toolset-name"></span><span id="toolset"></span><h3><a class="toc-backref" href="#id29">5.2.2&nbsp;&nbsp;&nbsp;Identify Your Toolset</a></h3> <span id="toolset-name"></span><span id="toolset"></span><h3><a class="toc-backref" href="#toc-entry-10">5.2.2&nbsp;&nbsp;&nbsp;Identify Your Toolset</a></h3>
<p>First, find the toolset corresponding to your compiler in the <p>First, find the toolset corresponding to your compiler in the
following table (an up-to-date list is always available <a class="reference external" href="http://www.boost.org/build/doc/html/bbv2/reference/tools.html">in the following table (an up-to-date list is always available <a class="reference external" href="../../tools/build/doc/html/index.html#bbv2.reference.tools">in the
Boost.Build documentation</a>).</p> Boost.Build documentation</a>).</p>
<div class="note"> <div class="admonition note">
<p class="first admonition-title">Note</p> <p class="first admonition-title">Note</p>
<p class="last">If you previously chose a toolset for the purposes of <p class="last">If you previously chose a toolset for the purposes of
<a class="reference external" href="../../doc/html/bbv2/installation.html">building b2</a>, you should assume it won't work and instead <a class="reference external" href="../../tools/build/doc/html/index.html#bbv2.installation">building b2</a>, you should assume it won't work and instead
choose newly from the table below.</p> choose newly from the table below.</p>
</div> </div>
<table border="1" class="docutils"> <table border="1" class="docutils">
@@ -356,7 +356,7 @@ Name</th>
</tr> </tr>
<tr><td><tt class="docutils literal">como</tt></td> <tr><td><tt class="docutils literal">como</tt></td>
<td>Comeau Computing</td> <td>Comeau Computing</td>
<td>Using this toolset may require <a class="reference external" href="../../tools/build/index.html">configuring</a> another <td>Using this toolset may require <a class="reference external" href="../../tools/build/doc/html/index.html">configuring</a> another
toolset to act as its backend.</td> toolset to act as its backend.</td>
</tr> </tr>
<tr><td><tt class="docutils literal">darwin</tt></td> <tr><td><tt class="docutils literal">darwin</tt></td>
@@ -403,28 +403,28 @@ the Apache standard library in C++03 mode use
<p>If you have multiple versions of a particular compiler installed, <p>If you have multiple versions of a particular compiler installed,
you can append the version number to the toolset name, preceded by you can append the version number to the toolset name, preceded by
a hyphen, e.g. <tt class="docutils literal"><span class="pre">intel-9.0</span></tt> or a hyphen, e.g. <tt class="docutils literal"><span class="pre">intel-9.0</span></tt> or
<tt class="docutils literal"><span class="pre">borland-5.4.3</span></tt>. <tt class="docutils literal"> </tt></p> <tt class="docutils literal"><span class="pre">borland-5.4.3</span></tt>. ``&nbsp;``</p>
</div> </div>
<div class="section" id="select-a-build-directory"> <div class="section" id="select-a-build-directory">
<span id="id11"></span><span id="build-directory"></span><h3><a class="toc-backref" href="#id30">5.2.3&nbsp;&nbsp;&nbsp;Select a Build Directory</a></h3> <span id="build-directory-1"></span><span id="build-directory"></span><h3><a class="toc-backref" href="#toc-entry-11">5.2.3&nbsp;&nbsp;&nbsp;Select a Build Directory</a></h3>
<p><a class="reference external" href="../../tools/build/index.html">Boost.Build</a> will place all intermediate files it generates while <p><a class="reference external" href="../../tools/build/doc/html/index.html">Boost.Build</a> will place all intermediate files it generates while
building into the <strong>build directory</strong>. If your Boost root building into the <strong>build directory</strong>. If your Boost root
directory is writable, this step isn't strictly necessary: by directory is writable, this step isn't strictly necessary: by
default Boost.Build will create a <tt class="docutils literal">bin.v2/</tt> subdirectory for that default Boost.Build will create a <tt class="docutils literal">bin.v2/</tt> subdirectory for that
purpose in your current working directory.</p> purpose in your current working directory.</p>
</div> </div>
<div class="section" id="invoke-b2"> <div class="section" id="invoke-b2">
<h3><a class="toc-backref" href="#id31">5.2.4&nbsp;&nbsp;&nbsp;Invoke <tt class="docutils literal">b2</tt></a></h3> <h3><a class="toc-backref" href="#toc-entry-12">5.2.4&nbsp;&nbsp;&nbsp;Invoke <tt class="docutils literal">b2</tt></a></h3>
<p>Change your current directory to the Boost root directory and <p>Change your current directory to the Boost root directory and
invoke <tt class="docutils literal">b2</tt> as follows:</p> invoke <tt class="docutils literal">b2</tt> as follows:</p>
<pre class="literal-block"> <pre class="literal-block">
b2 <strong>--build-dir=</strong><a class="reference internal" href="#id11"><em>build-directory</em></a> <strong>toolset=</strong><a class="reference internal" href="#toolset-name"><em>toolset-name</em></a> <tt class="docutils literal"> </tt> stage b2 <strong>--build-dir=</strong><a class="reference internal" href="#build-directory-1"><em>build-directory</em></a> <strong>toolset=</strong><a class="reference internal" href="#toolset-name"><em>toolset-name</em></a> ``&nbsp;`` stage
</pre> </pre>
<p>For a complete description of these and other invocation options, <p>For a complete description of these and other invocation options,
please see the <a class="reference external" href="http://www.boost.org/build/doc/html/bbv2/overview/invocation.html">Boost.Build documentation</a>.</p> please see the <a class="reference external" href="../../tools/build/doc/html/index.html#bbv2.overview.invocation">Boost.Build documentation</a>.</p>
<p>For example, your session might look like this:</p> <p>For example, your session might look like this:</p>
<pre class="literal-block"> <pre class="literal-block">
$ cd ~/<tt class="docutils literal">boost_1_73_0</tt> $ cd ~/<tt class="docutils literal">boost_1_93_0</tt>
$ b2 <strong>--build-dir=</strong>/tmp/build-boost <strong>toolset=</strong>gcc stage $ b2 <strong>--build-dir=</strong>/tmp/build-boost <strong>toolset=</strong>gcc stage
</pre> </pre>
<p>That will build static and shared non-debug multi-threaded variants of the libraries. To build all variants, pass the additional option, “<tt class="docutils literal"><span class="pre">--build-type=complete</span></tt>”.</p> <p>That will build static and shared non-debug multi-threaded variants of the libraries. To build all variants, pass the additional option, “<tt class="docutils literal"><span class="pre">--build-type=complete</span></tt>”.</p>
@@ -435,7 +435,7 @@ $ b2 <strong>--build-dir=</strong>/tmp/build-boost <strong>toolset=</strong>gcc
library binaries in the <tt class="docutils literal">stage</tt><tt class="docutils literal">/</tt><tt class="docutils literal">lib</tt><tt class="docutils literal">/</tt> subdirectory of library binaries in the <tt class="docutils literal">stage</tt><tt class="docutils literal">/</tt><tt class="docutils literal">lib</tt><tt class="docutils literal">/</tt> subdirectory of
the Boost tree. To use a different directory pass the the Boost tree. To use a different directory pass the
<tt class="docutils literal"><span class="pre">--stagedir=</span></tt><em>directory</em> option to <tt class="docutils literal">b2</tt>.</p> <tt class="docutils literal"><span class="pre">--stagedir=</span></tt><em>directory</em> option to <tt class="docutils literal">b2</tt>.</p>
<div class="note"> <div class="admonition note">
<p class="first admonition-title">Note</p> <p class="first admonition-title">Note</p>
<p class="last"><tt class="docutils literal">b2</tt> is case-sensitive; it is important that all the <p class="last"><tt class="docutils literal">b2</tt> is case-sensitive; it is important that all the
parts shown in <strong>bold</strong> type above be entirely lower-case.</p> parts shown in <strong>bold</strong> type above be entirely lower-case.</p>
@@ -453,7 +453,7 @@ be interested in:</p>
<li>choosing a specific build variant by adding <tt class="docutils literal">release</tt> or <li>choosing a specific build variant by adding <tt class="docutils literal">release</tt> or
<tt class="docutils literal">debug</tt> to the command line.</li> <tt class="docutils literal">debug</tt> to the command line.</li>
</ul> </ul>
<div class="note"> <div class="admonition note">
<p class="first admonition-title">Note</p> <p class="first admonition-title">Note</p>
<p class="last">Boost.Build can produce a great deal of output, which can <p class="last">Boost.Build can produce a great deal of output, which can
make it easy to miss problems. If you want to make sure make it easy to miss problems. If you want to make sure
@@ -463,7 +463,7 @@ file by appending “<tt class="docutils literal">&gt;build.log <span class="pre
</div> </div>
</div> </div>
<div class="section" id="expected-build-output"> <div class="section" id="expected-build-output">
<h2><a class="toc-backref" href="#id32">5.3&nbsp;&nbsp;&nbsp;Expected Build Output</a></h2> <h2><a class="toc-backref" href="#toc-entry-13">5.3&nbsp;&nbsp;&nbsp;Expected Build Output</a></h2>
<p>During the process of building Boost libraries, you can expect to <p>During the process of building Boost libraries, you can expect to
see some messages printed on the console. These may include</p> see some messages printed on the console. These may include</p>
<ul> <ul>
@@ -487,7 +487,7 @@ look something like:</p>
</ul> </ul>
</div> </div>
<div class="section" id="in-case-of-build-errors"> <div class="section" id="in-case-of-build-errors">
<h2><a class="toc-backref" href="#id33">5.4&nbsp;&nbsp;&nbsp;In Case of Build Errors</a></h2> <h2><a class="toc-backref" href="#toc-entry-14">5.4&nbsp;&nbsp;&nbsp;In Case of Build Errors</a></h2>
<p>The only error messages you see when building Boost—if any—should <p>The only error messages you see when building Boost—if any—should
be related to the IOStreams library's support of zip and bzip2 be related to the IOStreams library's support of zip and bzip2
formats as described <a class="reference external" href="../../libs/iostreams/doc/installation.html">here</a>. Install the relevant development formats as described <a class="reference external" href="../../libs/iostreams/doc/installation.html">here</a>. Install the relevant development
@@ -495,16 +495,16 @@ packages for libz and libbz2 if you need those features. Other
errors when building Boost libraries are cause for concern.</p> errors when building Boost libraries are cause for concern.</p>
<p>If it seems like the build system can't find your compiler and/or <p>If it seems like the build system can't find your compiler and/or
linker, consider setting up a <tt class="docutils literal"><span class="pre">user-config.jam</span></tt> file as described linker, consider setting up a <tt class="docutils literal"><span class="pre">user-config.jam</span></tt> file as described
<a class="reference external" href="http://www.boost.org/build/doc/html/bbv2/overview/configuration.html">here</a>. If that isn't your problem or the <tt class="docutils literal"><span class="pre">user-config.jam</span></tt> file <a class="reference external" href="../../tools/build/doc/html/index.html#bbv2.overview.configuration">here</a>. If that isn't your problem or the <tt class="docutils literal"><span class="pre">user-config.jam</span></tt> file
doesn't work for you, please address questions about configuring Boost doesn't work for you, please address questions about configuring Boost
for your compiler to the <a class="reference external" href="http://www.boost.org/more/mailing_lists.htm#jamboost">Boost.Build mailing list</a>.</p> for your compiler to the <a class="reference external" href="http://www.boost.org/more/mailing_lists.htm#users">Boost Users' mailing list</a>.</p>
<!-- Copyright David Abrahams 2006. Distributed under the Boost --> <!-- Copyright David Abrahams 2006. Distributed under the Boost -->
<!-- Software License, Version 1.0. (See accompanying --> <!-- Software License, Version 1.0. (See accompanying -->
<!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) --> <!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -->
</div> </div>
</div> </div>
<div class="section" id="link-your-program-to-a-boost-library"> <div class="section" id="link-your-program-to-a-boost-library">
<h1><a class="toc-backref" href="#id34">6&nbsp;&nbsp;&nbsp;Link Your Program to a Boost Library</a></h1> <h1><a class="toc-backref" href="#toc-entry-15">6&nbsp;&nbsp;&nbsp;Link Your Program to a Boost Library</a></h1>
<p>To demonstrate linking with a Boost binary library, we'll use the <p>To demonstrate linking with a Boost binary library, we'll use the
following simple program that extracts the subject lines from following simple program that extracts the subject lines from
emails. It uses the <a class="reference external" href="../../libs/regex/index.html">Boost.Regex</a> library, which has a emails. It uses the <a class="reference external" href="../../libs/regex/index.html">Boost.Regex</a> library, which has a
@@ -540,14 +540,14 @@ project.</li>
<ol class="upperalpha"> <ol class="upperalpha">
<li><p class="first">You can specify the full path to each library:</p> <li><p class="first">You can specify the full path to each library:</p>
<pre class="literal-block"> <pre class="literal-block">
$ c++ -I <em>path/to/</em><tt class="docutils literal">boost_1_73_0</tt> example.cpp -o example <strong>\</strong> $ c++ -I <em>path/to/</em><tt class="docutils literal">boost_1_93_0</tt> example.cpp -o example <strong>\</strong>
<strong>~/boost/stage/lib/libboost_regex-gcc34-mt-d-1_36.a</strong> <strong>~/boost/stage/lib/libboost_regex-gcc34-mt-d-1_36.a</strong>
</pre> </pre>
</li> </li>
<li><p class="first">You can separately specify a directory to search (with <tt class="docutils literal"><span class="pre">-L</span></tt><em>directory</em>) and a library name to search for (with <tt class="docutils literal"><span class="pre">-l</span></tt><em>library</em>,<a class="footnote-reference" href="#lowercase-l" id="id15"><sup>2</sup></a> dropping the filename's leading <tt class="docutils literal">lib</tt> and trailing <li><p class="first">You can separately specify a directory to search (with <tt class="docutils literal"><span class="pre">-L</span></tt><em>directory</em>) and a library name to search for (with <tt class="docutils literal"><span class="pre">-l</span></tt><em>library</em>,<a class="footnote-reference" href="#lowercase-l" id="footnote-reference-3"><sup>2</sup></a> dropping the filename's leading <tt class="docutils literal">lib</tt> and trailing
suffix (<tt class="docutils literal">.a</tt> in this case):</p> suffix (<tt class="docutils literal">.a</tt> in this case):</p>
<pre class="literal-block"> <pre class="literal-block">
$ c++ -I <em>path/to/</em><tt class="docutils literal">boost_1_73_0</tt> example.cpp -o example <strong>\</strong> $ c++ -I <em>path/to/</em><tt class="docutils literal">boost_1_93_0</tt> example.cpp -o example <strong>\</strong>
<strong>-L~/boost/stage/lib/ -lboost_regex-gcc34-mt-d-1_36</strong> <strong>-L~/boost/stage/lib/ -lboost_regex-gcc34-mt-d-1_36</strong>
</pre> </pre>
<p>As you can see, this method is just as terse as method A for one <p>As you can see, this method is just as terse as method A for one
@@ -562,7 +562,7 @@ automatically for you unless you pass a special option such as
<p>In both cases above, the bold text is what you'd add to <a class="reference internal" href="#build-a-simple-program-using-boost">the <p>In both cases above, the bold text is what you'd add to <a class="reference internal" href="#build-a-simple-program-using-boost">the
command lines we explored earlier</a>.</p> command lines we explored earlier</a>.</p>
<div class="section" id="library-naming"> <div class="section" id="library-naming">
<h2><a class="toc-backref" href="#id35">6.1&nbsp;&nbsp;&nbsp;Library Naming</a></h2> <h2><a class="toc-backref" href="#toc-entry-16">6.1&nbsp;&nbsp;&nbsp;Library Naming</a></h2>
<!-- Copyright David Abrahams 2006. Distributed under the Boost --> <!-- Copyright David Abrahams 2006. Distributed under the Boost -->
<!-- Software License, Version 1.0. (See accompanying --> <!-- Software License, Version 1.0. (See accompanying -->
<!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) --> <!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -->
@@ -577,7 +577,7 @@ following elements:</p>
<dd><em>Prefix</em>: except on Microsoft Windows, every Boost library <dd><em>Prefix</em>: except on Microsoft Windows, every Boost library
name begins with this string. On Windows, only ordinary static name begins with this string. On Windows, only ordinary static
libraries use the <tt class="docutils literal">lib</tt> prefix; import libraries and DLLs do libraries use the <tt class="docutils literal">lib</tt> prefix; import libraries and DLLs do
not.<a class="footnote-reference" href="#distinct" id="id17"><sup>4</sup></a></dd> not.<a class="footnote-reference" href="#distinct" id="footnote-reference-4"><sup>4</sup></a></dd>
<dt><tt class="docutils literal">boost_regex</tt></dt> <dt><tt class="docutils literal">boost_regex</tt></dt>
<dd><em>Library name</em>: all boost library filenames begin with <tt class="docutils literal">boost_</tt>.</dd> <dd><em>Library name</em>: all boost library filenames begin with <tt class="docutils literal">boost_</tt>.</dd>
<dt><tt class="docutils literal"><span class="pre">-vc71</span></tt></dt> <dt><tt class="docutils literal"><span class="pre">-vc71</span></tt></dt>
@@ -620,7 +620,7 @@ libraries.</td>
<td>python-debugging=on</td> <td>python-debugging=on</td>
</tr> </tr>
<tr><td><tt class="docutils literal">d</tt></td> <tr><td><tt class="docutils literal">d</tt></td>
<td>building a debug version of your code.<a class="footnote-reference" href="#debug-abi" id="id18"><sup>5</sup></a></td> <td>building a debug version of your code.<a class="footnote-reference" href="#debug-abi" id="footnote-reference-5"><sup>5</sup></a></td>
<td>variant=debug</td> <td>variant=debug</td>
</tr> </tr>
<tr><td><tt class="docutils literal">p</tt></td> <tr><td><tt class="docutils literal">p</tt></td>
@@ -728,7 +728,7 @@ version number, will also be created.</dd>
<!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) --> <!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -->
</div> </div>
<div class="section" id="test-your-program"> <div class="section" id="test-your-program">
<h2><a class="toc-backref" href="#id36">6.2&nbsp;&nbsp;&nbsp;Test Your Program</a></h2> <h2><a class="toc-backref" href="#toc-entry-17">6.2&nbsp;&nbsp;&nbsp;Test Your Program</a></h2>
<p>To test our subject extraction, we'll filter the following text <p>To test our subject extraction, we'll filter the following text
file. Copy it out of your browser and save it as <tt class="docutils literal">jayne.txt</tt>:</p> file. Copy it out of your browser and save it as <tt class="docutils literal">jayne.txt</tt>:</p>
<pre class="literal-block"> <pre class="literal-block">
@@ -768,7 +768,7 @@ Spoil Rock Hunter?”</p>
</div> </div>
</div> </div>
<div class="section" id="conclusion-and-further-resources"> <div class="section" id="conclusion-and-further-resources">
<h1><a class="toc-backref" href="#id37">7&nbsp;&nbsp;&nbsp;Conclusion and Further Resources</a></h1> <h1><a class="toc-backref" href="#toc-entry-18">7&nbsp;&nbsp;&nbsp;Conclusion and Further Resources</a></h1>
<p>This concludes your introduction to Boost and to integrating it <p>This concludes your introduction to Boost and to integrating it
with your programs. As you start using Boost in earnest, there are with your programs. As you start using Boost in earnest, there are
surely a few additional points you'll wish we had covered. One day surely a few additional points you'll wish we had covered. One day
@@ -778,12 +778,11 @@ If you can't find what you need, or there's anything we can do to
make this document clearer, please post it to the <a class="reference external" href="http://www.boost.org/more/mailing_lists.htm#users">Boost Users' make this document clearer, please post it to the <a class="reference external" href="http://www.boost.org/more/mailing_lists.htm#users">Boost Users'
mailing list</a>.</p> mailing list</a>.</p>
<ul class="simple"> <ul class="simple">
<li><a class="reference external" href="../../tools/build/index.html">Boost.Build reference manual</a></li> <li><a class="reference external" href="../../tools/build/doc/html/index.html">Boost.Build reference manual</a></li>
<li><a class="reference external" href="http://www.boost.org/more/mailing_lists.htm#users">Boost Users' mailing list</a></li> <li><a class="reference external" href="http://www.boost.org/more/mailing_lists.htm#users">Boost Users' mailing list</a></li>
<li><a class="reference external" href="http://www.boost.org/more/mailing_lists.htm#jamboost">Boost.Build mailing list</a></li>
<li><a class="reference external" href="../../libs/index.html">Index of all Boost library documentation</a></li> <li><a class="reference external" href="../../libs/index.html">Index of all Boost library documentation</a></li>
</ul> </ul>
<div class="admonition-onward admonition"> <div class="admonition admonition-onward">
<p class="first admonition-title">Onward</p> <p class="first admonition-title">Onward</p>
<blockquote class="epigraph last"> <blockquote class="epigraph last">
<p>Good luck, and have fun!</p> <p>Good luck, and have fun!</p>
@@ -794,7 +793,7 @@ mailing list</a>.</p>
<table class="docutils footnote" frame="void" id="packagers" rules="none"> <table class="docutils footnote" frame="void" id="packagers" rules="none">
<colgroup><col class="label" /><col /></colgroup> <colgroup><col class="label" /><col /></colgroup>
<tbody valign="top"> <tbody valign="top">
<tr><td class="label"><a class="fn-backref" href="#id2">[1]</a></td><td>If developers of Boost packages would like to work <tr><td class="label"><a class="fn-backref" href="#footnote-reference-1">[1]</a></td><td>If developers of Boost packages would like to work
with us to make sure these instructions can be used with their with us to make sure these instructions can be used with their
packages, we'd be glad to help. Please make your interest known packages, we'd be glad to help. Please make your interest known
to the <a class="reference external" href="http://www.boost.org/more/mailing_lists.htm#main">Boost developers' list</a>.</td></tr> to the <a class="reference external" href="http://www.boost.org/more/mailing_lists.htm#main">Boost developers' list</a>.</td></tr>
@@ -803,7 +802,7 @@ to the <a class="reference external" href="http://www.boost.org/more/mailing_lis
<table class="docutils footnote" frame="void" id="lowercase-l" rules="none"> <table class="docutils footnote" frame="void" id="lowercase-l" rules="none">
<colgroup><col class="label" /><col /></colgroup> <colgroup><col class="label" /><col /></colgroup>
<tbody valign="top"> <tbody valign="top">
<tr><td class="label"><a class="fn-backref" href="#id15">[2]</a></td><td>That option is a dash followed by a lowercase “L” <tr><td class="label"><a class="fn-backref" href="#footnote-reference-3">[2]</a></td><td>That option is a dash followed by a lowercase “L”
character, which looks very much like a numeral 1 in some fonts.</td></tr> character, which looks very much like a numeral 1 in some fonts.</td></tr>
</tbody> </tbody>
</table> </table>
@@ -813,7 +812,7 @@ character, which looks very much like a numeral 1 in some fonts.</td></tr>
<table class="docutils footnote" frame="void" id="warnings" rules="none"> <table class="docutils footnote" frame="void" id="warnings" rules="none">
<colgroup><col class="label" /><col /></colgroup> <colgroup><col class="label" /><col /></colgroup>
<tbody valign="top"> <tbody valign="top">
<tr><td class="label"><a class="fn-backref" href="#id6">[3]</a></td><td>Remember that warnings are specific to each compiler <tr><td class="label"><a class="fn-backref" href="#footnote-reference-2">[3]</a></td><td>Remember that warnings are specific to each compiler
implementation. The developer of a given Boost library might implementation. The developer of a given Boost library might
not have access to your compiler. Also, some warnings are not have access to your compiler. Also, some warnings are
extremely difficult to eliminate in generic code, to the point extremely difficult to eliminate in generic code, to the point
@@ -824,7 +823,7 @@ have any source code mechanism for suppressing warnings.</td></tr>
<table class="docutils footnote" frame="void" id="distinct" rules="none"> <table class="docutils footnote" frame="void" id="distinct" rules="none">
<colgroup><col class="label" /><col /></colgroup> <colgroup><col class="label" /><col /></colgroup>
<tbody valign="top"> <tbody valign="top">
<tr><td class="label"><a class="fn-backref" href="#id17">[4]</a></td><td>This convention distinguishes the static version of <tr><td class="label"><a class="fn-backref" href="#footnote-reference-4">[4]</a></td><td>This convention distinguishes the static version of
a Boost library from the import library for an a Boost library from the import library for an
identically-configured Boost DLL, which would otherwise have the identically-configured Boost DLL, which would otherwise have the
same name.</td></tr> same name.</td></tr>
@@ -833,7 +832,7 @@ same name.</td></tr>
<table class="docutils footnote" frame="void" id="debug-abi" rules="none"> <table class="docutils footnote" frame="void" id="debug-abi" rules="none">
<colgroup><col class="label" /><col /></colgroup> <colgroup><col class="label" /><col /></colgroup>
<tbody valign="top"> <tbody valign="top">
<tr><td class="label"><a class="fn-backref" href="#id18">[5]</a></td><td>These libraries were compiled without optimization <tr><td class="label"><a class="fn-backref" href="#footnote-reference-5">[5]</a></td><td>These libraries were compiled without optimization
or inlining, with full debug symbols enabled, and without or inlining, with full debug symbols enabled, and without
<tt class="docutils literal">NDEBUG</tt> <tt class="docutils literal">#define</tt>d. Although it's true that sometimes <tt class="docutils literal">NDEBUG</tt> <tt class="docutils literal">#define</tt>d. Although it's true that sometimes
these choices don't affect binary compatibility with other these choices don't affect binary compatibility with other

View File

@@ -1,20 +1,20 @@
<?xml version="1.0" encoding="utf-8" ?> <?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" /> <meta name="generator" content="Docutils 0.22.4: https://docutils.sourceforge.io/" />
<title>Boost Getting Started on Windows</title> <title>Boost Getting Started on Windows</title>
<link rel="stylesheet" href="../../rst.css" type="text/css" /> <link rel="stylesheet" href="../../rst.css" type="text/css" />
</head> </head>
<body> <body>
<div class="document" id="logo-getting-started-on-windows"> <div class="document" id="logo-getting-started-on-windows">
<h1 class="title"><a class="reference external" href="../../index.htm"><img alt="Boost" class="boost-logo" src="../../boost.png" /></a> Getting Started on Windows</h1> <h1 class="title"><a class="reference external image-reference" href="../../index.htm"><img alt="Boost" class="boost-logo" src="../../boost.png" /></a> Getting Started on Windows</h1>
<!-- Copyright David Abrahams 2006. Distributed under the Boost --> <!-- Copyright David Abrahams 2006. Distributed under the Boost -->
<!-- Software License, Version 1.0. (See accompanying --> <!-- Software License, Version 1.0. (See accompanying -->
<!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) --> <!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -->
<div class="admonition-a-note-to-cygwin-and-mingw-users admonition"> <div class="admonition admonition-a-note-to-cygwin-and-mingw-users">
<p class="first admonition-title">A note to <a class="reference external" href="http://www.cygwin.com">Cygwin</a> and <a class="reference external" href="http://mingw.org">MinGW</a> users</p> <p class="first admonition-title">A note to <a class="reference external" href="http://www.cygwin.com">Cygwin</a> and <a class="reference external" href="http://mingw.org">MinGW</a> users</p>
<p class="last">If you plan to use your tools from the Windows command prompt, <p class="last">If you plan to use your tools from the Windows command prompt,
you're in the right place. If you plan to build from the <a class="reference external" href="http://www.cygwin.com">Cygwin</a> you're in the right place. If you plan to build from the <a class="reference external" href="http://www.cygwin.com">Cygwin</a>
@@ -24,54 +24,54 @@ variants</a>. Other command shells, such as <a class="reference external" href=
not supported—they may or may not work.</p> not supported—they may or may not work.</p>
</div> </div>
<div class="contents topic" id="index"> <div class="contents topic" id="index">
<p class="topic-title first">Index</p> <p class="topic-title"><a class="reference internal" href="#top">Index</a></p>
<ul class="auto-toc simple"> <ul class="auto-toc simple">
<li><a class="reference internal" href="#get-boost" id="id28">1&nbsp;&nbsp;&nbsp;Get Boost</a></li> <li><a class="reference internal" href="#get-boost" id="toc-entry-1">1&nbsp;&nbsp;&nbsp;Get Boost</a></li>
<li><a class="reference internal" href="#the-boost-distribution" id="id29">2&nbsp;&nbsp;&nbsp;The Boost Distribution</a></li> <li><a class="reference internal" href="#the-boost-distribution" id="toc-entry-2">2&nbsp;&nbsp;&nbsp;The Boost Distribution</a></li>
<li><a class="reference internal" href="#header-only-libraries" id="id30">3&nbsp;&nbsp;&nbsp;Header-Only Libraries</a></li> <li><a class="reference internal" href="#header-only-libraries" id="toc-entry-3">3&nbsp;&nbsp;&nbsp;Header-Only Libraries</a></li>
<li><a class="reference internal" href="#build-a-simple-program-using-boost" id="id31">4&nbsp;&nbsp;&nbsp;Build a Simple Program Using Boost</a><ul class="auto-toc"> <li><a class="reference internal" href="#build-a-simple-program-using-boost" id="toc-entry-4">4&nbsp;&nbsp;&nbsp;Build a Simple Program Using Boost</a><ul class="auto-toc">
<li><a class="reference internal" href="#build-from-the-visual-studio-ide" id="id32">4.1&nbsp;&nbsp;&nbsp;Build From the Visual Studio IDE</a></li> <li><a class="reference internal" href="#build-from-the-visual-studio-ide" id="toc-entry-5">4.1&nbsp;&nbsp;&nbsp;Build From the Visual Studio IDE</a></li>
<li><a class="reference internal" href="#or-build-from-the-command-prompt" id="id33">4.2&nbsp;&nbsp;&nbsp;Or, Build From the Command Prompt</a></li> <li><a class="reference internal" href="#or-build-from-the-command-prompt" id="toc-entry-6">4.2&nbsp;&nbsp;&nbsp;Or, Build From the Command Prompt</a></li>
<li><a class="reference internal" href="#errors-and-warnings" id="id34">4.3&nbsp;&nbsp;&nbsp;Errors and Warnings</a></li> <li><a class="reference internal" href="#errors-and-warnings" id="toc-entry-7">4.3&nbsp;&nbsp;&nbsp;Errors and Warnings</a></li>
</ul> </ul>
</li> </li>
<li><a class="reference internal" href="#prepare-to-use-a-boost-library-binary" id="id35">5&nbsp;&nbsp;&nbsp;Prepare to Use a Boost Library Binary</a><ul class="auto-toc"> <li><a class="reference internal" href="#prepare-to-use-a-boost-library-binary" id="toc-entry-8">5&nbsp;&nbsp;&nbsp;Prepare to Use a Boost Library Binary</a><ul class="auto-toc">
<li><a class="reference internal" href="#simplified-build-from-source" id="id36">5.1&nbsp;&nbsp;&nbsp;Simplified Build From Source</a></li> <li><a class="reference internal" href="#simplified-build-from-source" id="toc-entry-9">5.1&nbsp;&nbsp;&nbsp;Simplified Build From Source</a></li>
<li><a class="reference internal" href="#or-build-binaries-from-source" id="id37">5.2&nbsp;&nbsp;&nbsp;Or, Build Binaries From Source</a><ul class="auto-toc"> <li><a class="reference internal" href="#or-build-binaries-from-source" id="toc-entry-10">5.2&nbsp;&nbsp;&nbsp;Or, Build Binaries From Source</a><ul class="auto-toc">
<li><a class="reference internal" href="#install-boost-build" id="id38">5.2.1&nbsp;&nbsp;&nbsp;Install Boost.Build</a></li> <li><a class="reference internal" href="#install-boost-build" id="toc-entry-11">5.2.1&nbsp;&nbsp;&nbsp;Install Boost.Build</a></li>
<li><a class="reference internal" href="#identify-your-toolset" id="id39">5.2.2&nbsp;&nbsp;&nbsp;Identify Your Toolset</a></li> <li><a class="reference internal" href="#identify-your-toolset" id="toc-entry-12">5.2.2&nbsp;&nbsp;&nbsp;Identify Your Toolset</a></li>
<li><a class="reference internal" href="#select-a-build-directory" id="id40">5.2.3&nbsp;&nbsp;&nbsp;Select a Build Directory</a></li> <li><a class="reference internal" href="#select-a-build-directory" id="toc-entry-13">5.2.3&nbsp;&nbsp;&nbsp;Select a Build Directory</a></li>
<li><a class="reference internal" href="#invoke-b2" id="id41">5.2.4&nbsp;&nbsp;&nbsp;Invoke <tt class="docutils literal">b2</tt></a></li> <li><a class="reference internal" href="#invoke-b2" id="toc-entry-14">5.2.4&nbsp;&nbsp;&nbsp;Invoke <tt class="docutils literal">b2</tt></a></li>
</ul> </ul>
</li> </li>
<li><a class="reference internal" href="#expected-build-output" id="id42">5.3&nbsp;&nbsp;&nbsp;Expected Build Output</a></li> <li><a class="reference internal" href="#expected-build-output" id="toc-entry-15">5.3&nbsp;&nbsp;&nbsp;Expected Build Output</a></li>
<li><a class="reference internal" href="#in-case-of-build-errors" id="id43">5.4&nbsp;&nbsp;&nbsp;In Case of Build Errors</a></li> <li><a class="reference internal" href="#in-case-of-build-errors" id="toc-entry-16">5.4&nbsp;&nbsp;&nbsp;In Case of Build Errors</a></li>
</ul> </ul>
</li> </li>
<li><a class="reference internal" href="#link-your-program-to-a-boost-library" id="id44">6&nbsp;&nbsp;&nbsp;Link Your Program to a Boost Library</a><ul class="auto-toc"> <li><a class="reference internal" href="#link-your-program-to-a-boost-library" id="toc-entry-17">6&nbsp;&nbsp;&nbsp;Link Your Program to a Boost Library</a><ul class="auto-toc">
<li><a class="reference internal" href="#link-from-within-the-visual-studio-ide" id="id45">6.1&nbsp;&nbsp;&nbsp;Link From Within the Visual Studio IDE</a></li> <li><a class="reference internal" href="#link-from-within-the-visual-studio-ide" id="toc-entry-18">6.1&nbsp;&nbsp;&nbsp;Link From Within the Visual Studio IDE</a></li>
<li><a class="reference internal" href="#or-link-from-the-command-prompt" id="id46">6.2&nbsp;&nbsp;&nbsp;Or, Link From the Command Prompt</a></li> <li><a class="reference internal" href="#or-link-from-the-command-prompt" id="toc-entry-19">6.2&nbsp;&nbsp;&nbsp;Or, Link From the Command Prompt</a></li>
<li><a class="reference internal" href="#library-naming" id="id47">6.3&nbsp;&nbsp;&nbsp;Library Naming</a></li> <li><a class="reference internal" href="#library-naming" id="toc-entry-20">6.3&nbsp;&nbsp;&nbsp;Library Naming</a></li>
<li><a class="reference internal" href="#test-your-program" id="id48">6.4&nbsp;&nbsp;&nbsp;Test Your Program</a></li> <li><a class="reference internal" href="#test-your-program" id="toc-entry-21">6.4&nbsp;&nbsp;&nbsp;Test Your Program</a></li>
</ul> </ul>
</li> </li>
<li><a class="reference internal" href="#conclusion-and-further-resources" id="id49">7&nbsp;&nbsp;&nbsp;Conclusion and Further Resources</a></li> <li><a class="reference internal" href="#conclusion-and-further-resources" id="toc-entry-22">7&nbsp;&nbsp;&nbsp;Conclusion and Further Resources</a></li>
</ul> </ul>
</div> </div>
<div class="section" id="get-boost"> <div class="section" id="get-boost">
<h1><a class="toc-backref" href="#id28">1&nbsp;&nbsp;&nbsp;Get Boost</a></h1> <h1><a class="toc-backref" href="#toc-entry-1">1&nbsp;&nbsp;&nbsp;Get Boost</a></h1>
<p>The most reliable way to get a copy of Boost is to <p>The most reliable way to get a copy of Boost is to
download <a class="reference external" href="http://www.boost.org/users/history/version_1_73_0.html"><tt class="docutils literal">boost_1_73_0</tt><tt class="docutils literal">.7z</tt></a> or <a class="reference external" href="http://www.boost.org/users/history/version_1_73_0.html"><tt class="docutils literal">boost_1_73_0</tt><tt class="docutils literal">.zip</tt></a> and unpack it to install a complete Boost download <a class="reference external" href="http://www.boost.org/users/history/version_1_93_0.html"><tt class="docutils literal">boost_1_93_0</tt><tt class="docutils literal">.7z</tt></a> or <a class="reference external" href="http://www.boost.org/users/history/version_1_93_0.html"><tt class="docutils literal">boost_1_93_0</tt><tt class="docutils literal">.zip</tt></a> and unpack it to install a complete Boost
distribution.<a class="footnote-reference" href="#zip" id="id2"><sup>1</sup></a></p> distribution.<a class="footnote-reference" href="#zip" id="footnote-reference-1"><sup>1</sup></a></p>
<!-- Copyright David Abrahams 2006. Distributed under the Boost --> <!-- Copyright David Abrahams 2006. Distributed under the Boost -->
<!-- Software License, Version 1.0. (See accompanying --> <!-- Software License, Version 1.0. (See accompanying -->
<!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) --> <!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -->
</div> </div>
<div class="section" id="the-boost-distribution"> <div class="section" id="the-boost-distribution">
<h1><a class="toc-backref" href="#id29">2&nbsp;&nbsp;&nbsp;The Boost Distribution</a></h1> <h1><a class="toc-backref" href="#toc-entry-2">2&nbsp;&nbsp;&nbsp;The Boost Distribution</a></h1>
<p>This is a sketch of the resulting directory structure:</p> <p>This is a sketch of the resulting directory structure:</p>
<pre class="literal-block"> <pre class="literal-block">
<strong>boost_1_73_0</strong><strong>\</strong> .................<em>The “boost root directory”</em> <strong>boost_1_93_0</strong><strong>\</strong> .................<em>The “boost root directory”</em>
<strong>index.htm</strong> .........<em>A copy of www.boost.org starts here</em> <strong>index.htm</strong> .........<em>A copy of www.boost.org starts here</em>
<strong>boost</strong><strong>\</strong> .........................<em>All Boost Header files</em> <strong>boost</strong><strong>\</strong> .........................<em>All Boost Header files</em>
<strong>lib</strong><strong>\</strong> .....................<em>precompiled library binaries</em> <strong>lib</strong><strong>\</strong> .....................<em>precompiled library binaries</em>
@@ -116,7 +116,7 @@ anything you can use in these directories.</p>
</div> </div>
<p>It's important to note the following:</p> <p>It's important to note the following:</p>
<ol class="arabic" id="boost-root-directory"> <ol class="arabic" id="boost-root-directory">
<li><p class="first">The path to the <strong>boost root directory</strong> (often <tt class="docutils literal"><span class="pre">C:\Program</span> Files\boost\</tt><tt class="docutils literal">boost_1_73_0</tt>) is <li><p class="first">The path to the <strong>boost root directory</strong> (often <tt class="docutils literal"><span class="pre">C:\Program</span> Files\boost\</tt><tt class="docutils literal">boost_1_93_0</tt>) is
sometimes referred to as <tt class="docutils literal">$BOOST_ROOT</tt> in documentation and sometimes referred to as <tt class="docutils literal">$BOOST_ROOT</tt> in documentation and
mailing lists .</p> mailing lists .</p>
</li> </li>
@@ -151,10 +151,10 @@ contains a subset of the Boost documentation. Start with
<!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) --> <!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -->
</div> </div>
<div class="section" id="header-only-libraries"> <div class="section" id="header-only-libraries">
<h1><a class="toc-backref" href="#id30">3&nbsp;&nbsp;&nbsp;Header-Only Libraries</a></h1> <h1><a class="toc-backref" href="#toc-entry-3">3&nbsp;&nbsp;&nbsp;Header-Only Libraries</a></h1>
<p>The first thing many people want to know is, “how do I build <p>The first thing many people want to know is, “how do I build
Boost?” The good news is that often, there's nothing to build.</p> Boost?” The good news is that often, there's nothing to build.</p>
<div class="admonition-nothing-to-build admonition"> <div class="admonition admonition-nothing-to-build">
<p class="first admonition-title">Nothing to Build?</p> <p class="first admonition-title">Nothing to Build?</p>
<p class="last">Most Boost libraries are <strong>header-only</strong>: they consist <em>entirely <p class="last">Most Boost libraries are <strong>header-only</strong>: they consist <em>entirely
of header files</em> containing templates and inline functions, and of header files</em> containing templates and inline functions, and
@@ -205,7 +205,7 @@ necessary.</li>
<!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) --> <!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -->
</div> </div>
<div class="section" id="build-a-simple-program-using-boost"> <div class="section" id="build-a-simple-program-using-boost">
<h1><a class="toc-backref" href="#id31">4&nbsp;&nbsp;&nbsp;Build a Simple Program Using Boost</a></h1> <h1><a class="toc-backref" href="#toc-entry-4">4&nbsp;&nbsp;&nbsp;Build a Simple Program Using Boost</a></h1>
<p>To keep things simple, let's start by using a header-only library. <p>To keep things simple, let's start by using a header-only library.
The following program reads a sequence of integers from standard The following program reads a sequence of integers from standard
input, uses Boost.Lambda to multiply each number by three, and input, uses Boost.Lambda to multiply each number by three, and
@@ -226,7 +226,7 @@ int main()
} }
</pre> </pre>
<p>Copy the text of this program into a file called <tt class="docutils literal">example.cpp</tt>.</p> <p>Copy the text of this program into a file called <tt class="docutils literal">example.cpp</tt>.</p>
<div class="note" id="command-line-tool"> <div class="admonition note" id="command-line-tool">
<span id="command-prompt"></span><p class="first admonition-title">Note</p> <span id="command-prompt"></span><p class="first admonition-title">Note</p>
<p class="last">To build the examples in this guide, you can use an <p class="last">To build the examples in this guide, you can use an
Integrated Development Environment (IDE) like Visual Studio, or Integrated Development Environment (IDE) like Visual Studio, or
@@ -254,14 +254,14 @@ cd <em>path</em>\<em>to</em>\<em>some</em>\<em>directory</em>
</pre> </pre>
<p>followed by Return. For example,</p> <p>followed by Return. For example,</p>
<pre class="literal-block"> <pre class="literal-block">
cd <tt class="docutils literal"><span class="pre">C:\Program</span> Files\boost\</tt><tt class="docutils literal">boost_1_73_0</tt> cd <tt class="docutils literal"><span class="pre">C:\Program</span> Files\boost\</tt><tt class="docutils literal">boost_1_93_0</tt>
</pre> </pre>
<p class="last">Long commands can be continued across several lines by typing a <p class="last">Long commands can be continued across several lines by typing a
caret (<tt class="docutils literal">^</tt>) at the end of all but the last line. Some examples caret (<tt class="docutils literal">^</tt>) at the end of all but the last line. Some examples
on this page use that technique to save horizontal space.</p> on this page use that technique to save horizontal space.</p>
</div> </div>
<div class="section" id="build-from-the-visual-studio-ide"> <div class="section" id="build-from-the-visual-studio-ide">
<span id="vs-header-only"></span><h2><a class="toc-backref" href="#id32">4.1&nbsp;&nbsp;&nbsp;Build From the Visual Studio IDE</a></h2> <span id="vs-header-only"></span><h2><a class="toc-backref" href="#toc-entry-5">4.1&nbsp;&nbsp;&nbsp;Build From the Visual Studio IDE</a></h2>
<ul> <ul>
<li><p class="first">From Visual Studio's <em>File</em> menu, select <em>New</em> &gt; <em>Project…</em></p> <li><p class="first">From Visual Studio's <em>File</em> menu, select <em>New</em> &gt; <em>Project…</em></p>
</li> </li>
@@ -279,12 +279,12 @@ select <em>Properties</em> from the resulting pop-up menu</p>
<li><p class="first">In <em>Configuration Properties</em> &gt; <em>C/C++</em> &gt; <em>General</em> &gt; <em>Additional Include <li><p class="first">In <em>Configuration Properties</em> &gt; <em>C/C++</em> &gt; <em>General</em> &gt; <em>Additional Include
Directories</em>, enter the path to the Boost root directory, for example</p> Directories</em>, enter the path to the Boost root directory, for example</p>
<blockquote> <blockquote>
<p><tt class="docutils literal"><span class="pre">C:\Program</span> Files\boost\</tt><tt class="docutils literal">boost_1_73_0</tt></p> <p><tt class="docutils literal"><span class="pre">C:\Program</span> Files\boost\</tt><tt class="docutils literal">boost_1_93_0</tt></p>
</blockquote> </blockquote>
</li> </li>
<li><p class="first">In <em>Configuration Properties</em> &gt; <em>C/C++</em> &gt; <em>Precompiled Headers</em>, change <li><p class="first">In <em>Configuration Properties</em> &gt; <em>C/C++</em> &gt; <em>Precompiled Headers</em>, change
<em>Use Precompiled Header (/Yu)</em> to <em>Not Using Precompiled <em>Use Precompiled Header (/Yu)</em> to <em>Not Using Precompiled
Headers</em>.<a class="footnote-reference" href="#pch" id="id6"><sup>2</sup></a></p> Headers</em>.<a class="footnote-reference" href="#pch" id="footnote-reference-2"><sup>2</sup></a></p>
</li> </li>
<li><p class="first">Replace the contents of the <tt class="docutils literal">example.cpp</tt> generated by the IDE <li><p class="first">Replace the contents of the <tt class="docutils literal">example.cpp</tt> generated by the IDE
with the example code above.</p> with the example code above.</p>
@@ -302,7 +302,7 @@ Return key.</p>
<p><a class="reference internal" href="#errors-and-warnings"><em>skip to the next step</em></a></p> <p><a class="reference internal" href="#errors-and-warnings"><em>skip to the next step</em></a></p>
</div> </div>
<div class="section" id="or-build-from-the-command-prompt"> <div class="section" id="or-build-from-the-command-prompt">
<h2><a class="toc-backref" href="#id33">4.2&nbsp;&nbsp;&nbsp;Or, Build From the Command Prompt</a></h2> <h2><a class="toc-backref" href="#toc-entry-6">4.2&nbsp;&nbsp;&nbsp;Or, Build From the Command Prompt</a></h2>
<p>From your computer's <em>Start</em> menu, if you are a Visual <p>From your computer's <em>Start</em> menu, if you are a Visual
Studio 2005 user, select</p> Studio 2005 user, select</p>
<blockquote> <blockquote>
@@ -317,7 +317,7 @@ Visual Studio compiler. In that window, set the <a class="reference internal" h
directory</a> to a suitable location for creating some temporary directory</a> to a suitable location for creating some temporary
files and type the following command followed by the Return key:</p> files and type the following command followed by the Return key:</p>
<pre class="literal-block"> <pre class="literal-block">
cl /EHsc /I <em>path\to\</em><tt class="docutils literal">boost_1_73_0</tt> <em>path</em>\<em>to</em>\example.cpp cl /EHsc /I <em>path\to\</em><tt class="docutils literal">boost_1_93_0</tt> <em>path</em>\<em>to</em>\example.cpp
</pre> </pre>
<p>To test the result, type:</p> <p>To test the result, type:</p>
<pre class="literal-block"> <pre class="literal-block">
@@ -328,10 +328,10 @@ echo 1 2 3 | example
<!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) --> <!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -->
</div> </div>
<div class="section" id="errors-and-warnings"> <div class="section" id="errors-and-warnings">
<h2><a class="toc-backref" href="#id34">4.3&nbsp;&nbsp;&nbsp;Errors and Warnings</a></h2> <h2><a class="toc-backref" href="#toc-entry-7">4.3&nbsp;&nbsp;&nbsp;Errors and Warnings</a></h2>
<p>Don't be alarmed if you see compiler warnings originating in Boost <p>Don't be alarmed if you see compiler warnings originating in Boost
headers. We try to eliminate them, but doing so isn't always headers. We try to eliminate them, but doing so isn't always
practical.<a class="footnote-reference" href="#warnings" id="id8"><sup>4</sup></a> <strong>Errors are another matter</strong>. If you're practical.<a class="footnote-reference" href="#warnings" id="footnote-reference-3"><sup>4</sup></a> <strong>Errors are another matter</strong>. If you're
seeing compilation errors at this point in the tutorial, check to seeing compilation errors at this point in the tutorial, check to
be sure you've copied the <a class="reference internal" href="#build-a-simple-program-using-boost">example program</a> correctly and that you've be sure you've copied the <a class="reference internal" href="#build-a-simple-program-using-boost">example program</a> correctly and that you've
correctly identified the <a class="reference internal" href="#boost-root-directory">Boost root directory</a>.</p> correctly identified the <a class="reference internal" href="#boost-root-directory">Boost root directory</a>.</p>
@@ -341,11 +341,11 @@ correctly identified the <a class="reference internal" href="#boost-root-directo
</div> </div>
</div> </div>
<div class="section" id="prepare-to-use-a-boost-library-binary"> <div class="section" id="prepare-to-use-a-boost-library-binary">
<h1><a class="toc-backref" href="#id35">5&nbsp;&nbsp;&nbsp;Prepare to Use a Boost Library Binary</a></h1> <h1><a class="toc-backref" href="#toc-entry-8">5&nbsp;&nbsp;&nbsp;Prepare to Use a Boost Library Binary</a></h1>
<p>If you want to use any of the separately-compiled Boost libraries, <p>If you want to use any of the separately-compiled Boost libraries,
you'll need to acquire library binaries.</p> you'll need to acquire library binaries.</p>
<div class="section" id="simplified-build-from-source"> <div class="section" id="simplified-build-from-source">
<h2><a class="toc-backref" href="#id36">5.1&nbsp;&nbsp;&nbsp;Simplified Build From Source</a></h2> <h2><a class="toc-backref" href="#toc-entry-9">5.1&nbsp;&nbsp;&nbsp;Simplified Build From Source</a></h2>
<p>If you wish to build from source with Visual C++, you can use a <p>If you wish to build from source with Visual C++, you can use a
simple build procedure described in this section. Open the command prompt simple build procedure described in this section. Open the command prompt
and change your current directory to the Boost root directory. Then, type and change your current directory to the Boost root directory. Then, type
@@ -356,20 +356,20 @@ bootstrap
</pre> </pre>
<p>The first command prepares the Boost.Build system for use. The second <p>The first command prepares the Boost.Build system for use. The second
command invokes Boost.Build to build the separately-compiled Boost command invokes Boost.Build to build the separately-compiled Boost
libraries. Please consult the <a class="reference external" href="http://www.boost.org/build/doc/html/bbv2/overview/invocation.html">Boost.Build documentation</a> for a list libraries. Please consult the <a class="reference external" href="../../tools/build/doc/html/index.html#bbv2.overview.invocation">Boost.Build documentation</a> for a list
of allowed options.</p> of allowed options.</p>
</div> </div>
<div class="section" id="or-build-binaries-from-source"> <div class="section" id="or-build-binaries-from-source">
<h2><a class="toc-backref" href="#id37">5.2&nbsp;&nbsp;&nbsp;Or, Build Binaries From Source</a></h2> <h2><a class="toc-backref" href="#toc-entry-10">5.2&nbsp;&nbsp;&nbsp;Or, Build Binaries From Source</a></h2>
<p>If you're using an earlier version of Visual C++, or a compiler <p>If you're using an earlier version of Visual C++, or a compiler
from another vendor, you'll need to use <a class="reference external" href="../../tools/build/index.html">Boost.Build</a> to create your from another vendor, you'll need to use <a class="reference external" href="../../tools/build/doc/html/index.html">Boost.Build</a> to create your
own binaries.</p> own binaries.</p>
<!-- Copyright David Abrahams 2006. Distributed under the Boost --> <!-- Copyright David Abrahams 2006. Distributed under the Boost -->
<!-- Software License, Version 1.0. (See accompanying --> <!-- Software License, Version 1.0. (See accompanying -->
<!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) --> <!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -->
<div class="section" id="install-boost-build"> <div class="section" id="install-boost-build">
<h3><a class="toc-backref" href="#id38">5.2.1&nbsp;&nbsp;&nbsp;Install Boost.Build</a></h3> <h3><a class="toc-backref" href="#toc-entry-11">5.2.1&nbsp;&nbsp;&nbsp;Install Boost.Build</a></h3>
<p><a class="reference external" href="../../tools/build/index.html">Boost.Build</a> is a text-based system for developing, testing, and <p><a class="reference external" href="../../tools/build/doc/html/index.html">Boost.Build</a> is a text-based system for developing, testing, and
installing software. First, you'll need to build and installing software. First, you'll need to build and
install it. To do this:</p> install it. To do this:</p>
<ol class="arabic simple"> <ol class="arabic simple">
@@ -381,14 +381,14 @@ the directory where you want Boost.Build to be installed</li>
</ol> </ol>
</div> </div>
<div class="section" id="identify-your-toolset"> <div class="section" id="identify-your-toolset">
<span id="toolset-name"></span><span id="toolset"></span><h3><a class="toc-backref" href="#id39">5.2.2&nbsp;&nbsp;&nbsp;Identify Your Toolset</a></h3> <span id="toolset-name"></span><span id="toolset"></span><h3><a class="toc-backref" href="#toc-entry-12">5.2.2&nbsp;&nbsp;&nbsp;Identify Your Toolset</a></h3>
<p>First, find the toolset corresponding to your compiler in the <p>First, find the toolset corresponding to your compiler in the
following table (an up-to-date list is always available <a class="reference external" href="http://www.boost.org/build/doc/html/bbv2/reference/tools.html">in the following table (an up-to-date list is always available <a class="reference external" href="../../tools/build/doc/html/index.html#bbv2.reference.tools">in the
Boost.Build documentation</a>).</p> Boost.Build documentation</a>).</p>
<div class="note"> <div class="admonition note">
<p class="first admonition-title">Note</p> <p class="first admonition-title">Note</p>
<p class="last">If you previously chose a toolset for the purposes of <p class="last">If you previously chose a toolset for the purposes of
<a class="reference external" href="../../doc/html/bbv2/installation.html">building b2</a>, you should assume it won't work and instead <a class="reference external" href="../../tools/build/doc/html/index.html#bbv2.installation">building b2</a>, you should assume it won't work and instead
choose newly from the table below.</p> choose newly from the table below.</p>
</div> </div>
<table border="1" class="docutils"> <table border="1" class="docutils">
@@ -415,7 +415,7 @@ Name</th>
</tr> </tr>
<tr><td><tt class="docutils literal">como</tt></td> <tr><td><tt class="docutils literal">como</tt></td>
<td>Comeau Computing</td> <td>Comeau Computing</td>
<td>Using this toolset may require <a class="reference external" href="../../tools/build/index.html">configuring</a> another <td>Using this toolset may require <a class="reference external" href="../../tools/build/doc/html/index.html">configuring</a> another
toolset to act as its backend.</td> toolset to act as its backend.</td>
</tr> </tr>
<tr><td><tt class="docutils literal">darwin</tt></td> <tr><td><tt class="docutils literal">darwin</tt></td>
@@ -468,26 +468,26 @@ are using the msvc or gcc toolsets, which have special version
detection code) or <a class="reference internal" href="#auto-linking">auto-linking</a> will fail.</p> detection code) or <a class="reference internal" href="#auto-linking">auto-linking</a> will fail.</p>
</div> </div>
<div class="section" id="select-a-build-directory"> <div class="section" id="select-a-build-directory">
<span id="id13"></span><span id="build-directory"></span><h3><a class="toc-backref" href="#id40">5.2.3&nbsp;&nbsp;&nbsp;Select a Build Directory</a></h3> <span id="build-directory-1"></span><span id="build-directory"></span><h3><a class="toc-backref" href="#toc-entry-13">5.2.3&nbsp;&nbsp;&nbsp;Select a Build Directory</a></h3>
<p><a class="reference external" href="../../tools/build/index.html">Boost.Build</a> will place all intermediate files it generates while <p><a class="reference external" href="../../tools/build/doc/html/index.html">Boost.Build</a> will place all intermediate files it generates while
building into the <strong>build directory</strong>. If your Boost root building into the <strong>build directory</strong>. If your Boost root
directory is writable, this step isn't strictly necessary: by directory is writable, this step isn't strictly necessary: by
default Boost.Build will create a <tt class="docutils literal">bin.v2/</tt> subdirectory for that default Boost.Build will create a <tt class="docutils literal">bin.v2/</tt> subdirectory for that
purpose in your current working directory.</p> purpose in your current working directory.</p>
</div> </div>
<div class="section" id="invoke-b2"> <div class="section" id="invoke-b2">
<h3><a class="toc-backref" href="#id41">5.2.4&nbsp;&nbsp;&nbsp;Invoke <tt class="docutils literal">b2</tt></a></h3> <h3><a class="toc-backref" href="#toc-entry-14">5.2.4&nbsp;&nbsp;&nbsp;Invoke <tt class="docutils literal">b2</tt></a></h3>
<p>Change your current directory to the Boost root directory and <p>Change your current directory to the Boost root directory and
invoke <tt class="docutils literal">b2</tt> as follows:</p> invoke <tt class="docutils literal">b2</tt> as follows:</p>
<pre class="literal-block"> <pre class="literal-block">
b2 <strong>--build-dir=</strong><a class="reference internal" href="#id13"><em>build-directory</em></a> <strong>toolset=</strong><a class="reference internal" href="#toolset-name"><em>toolset-name</em></a> <strong>--build-type=complete</strong> stage b2 <strong>--build-dir=</strong><a class="reference internal" href="#build-directory-1"><em>build-directory</em></a> <strong>toolset=</strong><a class="reference internal" href="#toolset-name"><em>toolset-name</em></a> <strong>--build-type=complete</strong> stage
</pre> </pre>
<p>For a complete description of these and other invocation options, <p>For a complete description of these and other invocation options,
please see the <a class="reference external" href="http://www.boost.org/build/doc/html/bbv2/overview/invocation.html">Boost.Build documentation</a>.</p> please see the <a class="reference external" href="../../tools/build/doc/html/index.html#bbv2.overview.invocation">Boost.Build documentation</a>.</p>
<p>For example, your session might look like this:<a class="footnote-reference" href="#continuation" id="id15"><sup>3</sup></a></p> <p>For example, your session might look like this:<a class="footnote-reference" href="#continuation" id="footnote-reference-4"><sup>3</sup></a></p>
<pre class="literal-block"> <pre class="literal-block">
C:\WINDOWS&gt; cd <tt class="docutils literal"><span class="pre">C:\Program</span> Files\boost\</tt><tt class="docutils literal">boost_1_73_0</tt> C:\WINDOWS&gt; cd <tt class="docutils literal"><span class="pre">C:\Program</span> Files\boost\</tt><tt class="docutils literal">boost_1_93_0</tt>
<tt class="docutils literal"><span class="pre">C:\Program</span> Files\boost\</tt><tt class="docutils literal">boost_1_73_0</tt>&gt; b2 <strong>^</strong> <tt class="docutils literal"><span class="pre">C:\Program</span> Files\boost\</tt><tt class="docutils literal">boost_1_93_0</tt>&gt; b2 <strong>^</strong>
More? <strong>--build-dir=</strong>&quot;C:\Documents and Settings\dave\build-boost&quot; <strong>^</strong> More? <strong>--build-dir=</strong>&quot;C:\Documents and Settings\dave\build-boost&quot; <strong>^</strong>
More? <strong>--build-type=complete</strong> <strong>msvc</strong> stage More? <strong>--build-type=complete</strong> <strong>msvc</strong> stage
</pre> </pre>
@@ -495,7 +495,7 @@ More? <strong>--build-type=complete</strong> <strong>msvc</strong> stage
<tt class="docutils literal">More?</tt> and quotation marks (<tt class="docutils literal">&quot;</tt>) in that line.</p> <tt class="docutils literal">More?</tt> and quotation marks (<tt class="docutils literal">&quot;</tt>) in that line.</p>
<p>The option “<strong>--build-type=complete</strong>” causes Boost.Build to build <p>The option “<strong>--build-type=complete</strong>” causes Boost.Build to build
all supported variants of the libraries. For instructions on how to all supported variants of the libraries. For instructions on how to
build only specific variants, please ask on the <a class="reference external" href="http://www.boost.org/more/mailing_lists.htm#jamboost">Boost.Build mailing build only specific variants, please ask on the <a class="reference external" href="http://www.boost.org/more/mailing_lists.htm#users">Boost Users' mailing
list</a>.</p> list</a>.</p>
<!-- Copyright David Abrahams 2006. Distributed under the Boost --> <!-- Copyright David Abrahams 2006. Distributed under the Boost -->
<!-- Software License, Version 1.0. (See accompanying --> <!-- Software License, Version 1.0. (See accompanying -->
@@ -504,7 +504,7 @@ list</a>.</p>
library binaries in the <tt class="docutils literal">stage</tt><tt class="docutils literal">\</tt><tt class="docutils literal">lib</tt><tt class="docutils literal">\</tt> subdirectory of library binaries in the <tt class="docutils literal">stage</tt><tt class="docutils literal">\</tt><tt class="docutils literal">lib</tt><tt class="docutils literal">\</tt> subdirectory of
the Boost tree. To use a different directory pass the the Boost tree. To use a different directory pass the
<tt class="docutils literal"><span class="pre">--stagedir=</span></tt><em>directory</em> option to <tt class="docutils literal">b2</tt>.</p> <tt class="docutils literal"><span class="pre">--stagedir=</span></tt><em>directory</em> option to <tt class="docutils literal">b2</tt>.</p>
<div class="note"> <div class="admonition note">
<p class="first admonition-title">Note</p> <p class="first admonition-title">Note</p>
<p class="last"><tt class="docutils literal">b2</tt> is case-sensitive; it is important that all the <p class="last"><tt class="docutils literal">b2</tt> is case-sensitive; it is important that all the
parts shown in <strong>bold</strong> type above be entirely lower-case.</p> parts shown in <strong>bold</strong> type above be entirely lower-case.</p>
@@ -522,7 +522,7 @@ be interested in:</p>
<li>choosing a specific build variant by adding <tt class="docutils literal">release</tt> or <li>choosing a specific build variant by adding <tt class="docutils literal">release</tt> or
<tt class="docutils literal">debug</tt> to the command line.</li> <tt class="docutils literal">debug</tt> to the command line.</li>
</ul> </ul>
<div class="note"> <div class="admonition note">
<p class="first admonition-title">Note</p> <p class="first admonition-title">Note</p>
<p class="last">Boost.Build can produce a great deal of output, which can <p class="last">Boost.Build can produce a great deal of output, which can
make it easy to miss problems. If you want to make sure make it easy to miss problems. If you want to make sure
@@ -532,7 +532,7 @@ file by appending “<tt class="docutils literal">&gt;build.log <span class="pre
</div> </div>
</div> </div>
<div class="section" id="expected-build-output"> <div class="section" id="expected-build-output">
<h2><a class="toc-backref" href="#id42">5.3&nbsp;&nbsp;&nbsp;Expected Build Output</a></h2> <h2><a class="toc-backref" href="#toc-entry-15">5.3&nbsp;&nbsp;&nbsp;Expected Build Output</a></h2>
<p>During the process of building Boost libraries, you can expect to <p>During the process of building Boost libraries, you can expect to
see some messages printed on the console. These may include</p> see some messages printed on the console. These may include</p>
<ul> <ul>
@@ -556,7 +556,7 @@ look something like:</p>
</ul> </ul>
</div> </div>
<div class="section" id="in-case-of-build-errors"> <div class="section" id="in-case-of-build-errors">
<h2><a class="toc-backref" href="#id43">5.4&nbsp;&nbsp;&nbsp;In Case of Build Errors</a></h2> <h2><a class="toc-backref" href="#toc-entry-16">5.4&nbsp;&nbsp;&nbsp;In Case of Build Errors</a></h2>
<p>The only error messages you see when building Boost—if any—should <p>The only error messages you see when building Boost—if any—should
be related to the IOStreams library's support of zip and bzip2 be related to the IOStreams library's support of zip and bzip2
formats as described <a class="reference external" href="../../libs/iostreams/doc/installation.html">here</a>. Install the relevant development formats as described <a class="reference external" href="../../libs/iostreams/doc/installation.html">here</a>. Install the relevant development
@@ -564,16 +564,16 @@ packages for libz and libbz2 if you need those features. Other
errors when building Boost libraries are cause for concern.</p> errors when building Boost libraries are cause for concern.</p>
<p>If it seems like the build system can't find your compiler and/or <p>If it seems like the build system can't find your compiler and/or
linker, consider setting up a <tt class="docutils literal"><span class="pre">user-config.jam</span></tt> file as described linker, consider setting up a <tt class="docutils literal"><span class="pre">user-config.jam</span></tt> file as described
<a class="reference external" href="http://www.boost.org/build/doc/html/bbv2/overview/configuration.html">here</a>. If that isn't your problem or the <tt class="docutils literal"><span class="pre">user-config.jam</span></tt> file <a class="reference external" href="../../tools/build/doc/html/index.html#bbv2.overview.configuration">here</a>. If that isn't your problem or the <tt class="docutils literal"><span class="pre">user-config.jam</span></tt> file
doesn't work for you, please address questions about configuring Boost doesn't work for you, please address questions about configuring Boost
for your compiler to the <a class="reference external" href="http://www.boost.org/more/mailing_lists.htm#jamboost">Boost.Build mailing list</a>.</p> for your compiler to the <a class="reference external" href="http://www.boost.org/more/mailing_lists.htm#users">Boost Users' mailing list</a>.</p>
<span class="target" id="auto-linking"></span><!-- Copyright David Abrahams 2006. Distributed under the Boost --> <span class="target" id="auto-linking"></span><!-- Copyright David Abrahams 2006. Distributed under the Boost -->
<!-- Software License, Version 1.0. (See accompanying --> <!-- Software License, Version 1.0. (See accompanying -->
<!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) --> <!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -->
</div> </div>
</div> </div>
<div class="section" id="link-your-program-to-a-boost-library"> <div class="section" id="link-your-program-to-a-boost-library">
<h1><a class="toc-backref" href="#id44">6&nbsp;&nbsp;&nbsp;Link Your Program to a Boost Library</a></h1> <h1><a class="toc-backref" href="#toc-entry-17">6&nbsp;&nbsp;&nbsp;Link Your Program to a Boost Library</a></h1>
<p>To demonstrate linking with a Boost binary library, we'll use the <p>To demonstrate linking with a Boost binary library, we'll use the
following simple program that extracts the subject lines from following simple program that extracts the subject lines from
emails. It uses the <a class="reference external" href="../../libs/regex/index.html">Boost.Regex</a> library, which has a emails. It uses the <a class="reference external" href="../../libs/regex/index.html">Boost.Regex</a> library, which has a
@@ -605,7 +605,7 @@ build settings.</li>
whose compile configuration is compatible with the rest of your whose compile configuration is compatible with the rest of your
project.</li> project.</li>
</ol> </ol>
<div class="admonition-auto-linking admonition"> <div class="admonition admonition-auto-linking">
<p class="first admonition-title">Auto-Linking</p> <p class="first admonition-title">Auto-Linking</p>
<p>Most Windows compilers and linkers have so-called “auto-linking <p>Most Windows compilers and linkers have so-called “auto-linking
support,” which eliminates the second challenge. Special code in support,” which eliminates the second challenge. Special code in
@@ -618,7 +618,7 @@ GCC users should refer to the <a class="reference external" href="unix-variants.
variant OSes</a> for the appropriate command-line options to use.</p> variant OSes</a> for the appropriate command-line options to use.</p>
</div> </div>
<div class="section" id="link-from-within-the-visual-studio-ide"> <div class="section" id="link-from-within-the-visual-studio-ide">
<h2><a class="toc-backref" href="#id45">6.1&nbsp;&nbsp;&nbsp;Link From Within the Visual Studio IDE</a></h2> <h2><a class="toc-backref" href="#toc-entry-18">6.1&nbsp;&nbsp;&nbsp;Link From Within the Visual Studio IDE</a></h2>
<p>Starting with the <a class="reference internal" href="#vs-header-only">header-only example project</a> we created <p>Starting with the <a class="reference internal" href="#vs-header-only">header-only example project</a> we created
earlier:</p> earlier:</p>
<ol class="arabic simple"> <ol class="arabic simple">
@@ -626,25 +626,25 @@ earlier:</p>
select <em>Properties</em> from the resulting pop-up menu</li> select <em>Properties</em> from the resulting pop-up menu</li>
<li>In <em>Configuration Properties</em> &gt; <em>Linker</em> &gt; <em>Additional Library <li>In <em>Configuration Properties</em> &gt; <em>Linker</em> &gt; <em>Additional Library
Directories</em>, enter the path to the Boost binaries, Directories</em>, enter the path to the Boost binaries,
e.g. <tt class="docutils literal"><span class="pre">C:\Program</span> Files\boost\</tt><tt class="docutils literal">boost_1_73_0</tt><tt class="docutils literal">\lib\</tt>.</li> e.g. <tt class="docutils literal"><span class="pre">C:\Program</span> Files\boost\</tt><tt class="docutils literal">boost_1_93_0</tt><tt class="docutils literal">\lib\</tt>.</li>
<li>From the <em>Build</em> menu, select <em>Build Solution</em>.</li> <li>From the <em>Build</em> menu, select <em>Build Solution</em>.</li>
</ol> </ol>
<p><a class="reference internal" href="#test-your-program"><em>skip to the next step</em></a></p> <p><a class="reference internal" href="#test-your-program"><em>skip to the next step</em></a></p>
</div> </div>
<div class="section" id="or-link-from-the-command-prompt"> <div class="section" id="or-link-from-the-command-prompt">
<h2><a class="toc-backref" href="#id46">6.2&nbsp;&nbsp;&nbsp;Or, Link From the Command Prompt</a></h2> <h2><a class="toc-backref" href="#toc-entry-19">6.2&nbsp;&nbsp;&nbsp;Or, Link From the Command Prompt</a></h2>
<p>For example, we can compile and link the above program from the <p>For example, we can compile and link the above program from the
Visual C++ command-line by simply adding the <strong>bold</strong> text below to Visual C++ command-line by simply adding the <strong>bold</strong> text below to
the command line we used earlier, assuming your Boost binaries are the command line we used earlier, assuming your Boost binaries are
in <tt class="docutils literal"><span class="pre">C:\Program</span> Files\boost\</tt><tt class="docutils literal">boost_1_73_0</tt><tt class="docutils literal">\lib</tt>:</p> in <tt class="docutils literal"><span class="pre">C:\Program</span> Files\boost\</tt><tt class="docutils literal">boost_1_93_0</tt><tt class="docutils literal">\lib</tt>:</p>
<pre class="literal-block"> <pre class="literal-block">
cl /EHsc /I <em>path\to\</em><tt class="docutils literal">boost_1_73_0</tt> example.cpp <strong>^</strong> cl /EHsc /I <em>path\to\</em><tt class="docutils literal">boost_1_93_0</tt> example.cpp <strong>^</strong>
<strong>/link /LIBPATH:</strong><strong>C:\Program Files\boost\</strong><strong>boost_1_73_0</strong><strong>\lib</strong> <strong>/link /LIBPATH:</strong><strong>C:\Program Files\boost\</strong><strong>boost_1_93_0</strong><strong>\lib</strong>
</pre> </pre>
</div> </div>
<div class="section" id="library-naming"> <div class="section" id="library-naming">
<h2><a class="toc-backref" href="#id47">6.3&nbsp;&nbsp;&nbsp;Library Naming</a></h2> <h2><a class="toc-backref" href="#toc-entry-20">6.3&nbsp;&nbsp;&nbsp;Library Naming</a></h2>
<div class="note"> <div class="admonition note">
<p class="first admonition-title">Note</p> <p class="first admonition-title">Note</p>
<p>If, like Visual C++, your compiler supports auto-linking, <p>If, like Visual C++, your compiler supports auto-linking,
you can probably <a class="reference internal" href="#test-your-program"><em>skip to the next step</em></a>.</p> you can probably <a class="reference internal" href="#test-your-program"><em>skip to the next step</em></a>.</p>
@@ -665,7 +665,7 @@ following elements:</p>
<dd><em>Prefix</em>: except on Microsoft Windows, every Boost library <dd><em>Prefix</em>: except on Microsoft Windows, every Boost library
name begins with this string. On Windows, only ordinary static name begins with this string. On Windows, only ordinary static
libraries use the <tt class="docutils literal">lib</tt> prefix; import libraries and DLLs do libraries use the <tt class="docutils literal">lib</tt> prefix; import libraries and DLLs do
not.<a class="footnote-reference" href="#distinct" id="id23"><sup>5</sup></a></dd> not.<a class="footnote-reference" href="#distinct" id="footnote-reference-5"><sup>5</sup></a></dd>
<dt><tt class="docutils literal">boost_regex</tt></dt> <dt><tt class="docutils literal">boost_regex</tt></dt>
<dd><em>Library name</em>: all boost library filenames begin with <tt class="docutils literal">boost_</tt>.</dd> <dd><em>Library name</em>: all boost library filenames begin with <tt class="docutils literal">boost_</tt>.</dd>
<dt><tt class="docutils literal"><span class="pre">-vc71</span></tt></dt> <dt><tt class="docutils literal"><span class="pre">-vc71</span></tt></dt>
@@ -708,7 +708,7 @@ libraries.</td>
<td>python-debugging=on</td> <td>python-debugging=on</td>
</tr> </tr>
<tr><td><tt class="docutils literal">d</tt></td> <tr><td><tt class="docutils literal">d</tt></td>
<td>building a debug version of your code.<a class="footnote-reference" href="#debug-abi" id="id24"><sup>6</sup></a></td> <td>building a debug version of your code.<a class="footnote-reference" href="#debug-abi" id="footnote-reference-6"><sup>6</sup></a></td>
<td>variant=debug</td> <td>variant=debug</td>
</tr> </tr>
<tr><td><tt class="docutils literal">p</tt></td> <tr><td><tt class="docutils literal">p</tt></td>
@@ -816,7 +816,7 @@ version number, will also be created.</dd>
<!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) --> <!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -->
</div> </div>
<div class="section" id="test-your-program"> <div class="section" id="test-your-program">
<h2><a class="toc-backref" href="#id48">6.4&nbsp;&nbsp;&nbsp;Test Your Program</a></h2> <h2><a class="toc-backref" href="#toc-entry-21">6.4&nbsp;&nbsp;&nbsp;Test Your Program</a></h2>
<p>To test our subject extraction, we'll filter the following text <p>To test our subject extraction, we'll filter the following text
file. Copy it out of your browser and save it as <tt class="docutils literal">jayne.txt</tt>:</p> file. Copy it out of your browser and save it as <tt class="docutils literal">jayne.txt</tt>:</p>
<pre class="literal-block"> <pre class="literal-block">
@@ -838,7 +838,7 @@ Spoil Rock Hunter?”</p>
</div> </div>
</div> </div>
<div class="section" id="conclusion-and-further-resources"> <div class="section" id="conclusion-and-further-resources">
<h1><a class="toc-backref" href="#id49">7&nbsp;&nbsp;&nbsp;Conclusion and Further Resources</a></h1> <h1><a class="toc-backref" href="#toc-entry-22">7&nbsp;&nbsp;&nbsp;Conclusion and Further Resources</a></h1>
<p>This concludes your introduction to Boost and to integrating it <p>This concludes your introduction to Boost and to integrating it
with your programs. As you start using Boost in earnest, there are with your programs. As you start using Boost in earnest, there are
surely a few additional points you'll wish we had covered. One day surely a few additional points you'll wish we had covered. One day
@@ -848,12 +848,11 @@ If you can't find what you need, or there's anything we can do to
make this document clearer, please post it to the <a class="reference external" href="http://www.boost.org/more/mailing_lists.htm#users">Boost Users' make this document clearer, please post it to the <a class="reference external" href="http://www.boost.org/more/mailing_lists.htm#users">Boost Users'
mailing list</a>.</p> mailing list</a>.</p>
<ul class="simple"> <ul class="simple">
<li><a class="reference external" href="../../tools/build/index.html">Boost.Build reference manual</a></li> <li><a class="reference external" href="../../tools/build/doc/html/index.html">Boost.Build reference manual</a></li>
<li><a class="reference external" href="http://www.boost.org/more/mailing_lists.htm#users">Boost Users' mailing list</a></li> <li><a class="reference external" href="http://www.boost.org/more/mailing_lists.htm#users">Boost Users' mailing list</a></li>
<li><a class="reference external" href="http://www.boost.org/more/mailing_lists.htm#jamboost">Boost.Build mailing list</a></li>
<li><a class="reference external" href="../../libs/index.html">Index of all Boost library documentation</a></li> <li><a class="reference external" href="../../libs/index.html">Index of all Boost library documentation</a></li>
</ul> </ul>
<div class="admonition-onward admonition"> <div class="admonition admonition-onward">
<p class="first admonition-title">Onward</p> <p class="first admonition-title">Onward</p>
<blockquote class="epigraph last"> <blockquote class="epigraph last">
<p>Good luck, and have fun!</p> <p>Good luck, and have fun!</p>
@@ -864,8 +863,8 @@ mailing list</a>.</p>
<table class="docutils footnote" frame="void" id="zip" rules="none"> <table class="docutils footnote" frame="void" id="zip" rules="none">
<colgroup><col class="label" /><col /></colgroup> <colgroup><col class="label" /><col /></colgroup>
<tbody valign="top"> <tbody valign="top">
<tr><td class="label"><a class="fn-backref" href="#id2">[1]</a></td><td>We recommend <tr><td class="label"><a class="fn-backref" href="#footnote-reference-1">[1]</a></td><td>We recommend
downloading <a class="reference external" href="http://www.boost.org/users/history/version_1_73_0.html"><tt class="docutils literal">boost_1_73_0</tt><tt class="docutils literal">.7z</tt></a> and using <a class="reference external" href="http://www.7-zip.org">7-Zip</a> to decompress downloading <a class="reference external" href="http://www.boost.org/users/history/version_1_93_0.html"><tt class="docutils literal">boost_1_93_0</tt><tt class="docutils literal">.7z</tt></a> and using <a class="reference external" href="http://www.7-zip.org">7-Zip</a> to decompress
it. We no longer recommend .zip files for Boost because they are twice it. We no longer recommend .zip files for Boost because they are twice
as large as the equivalent .7z files. We don't recommend using Windows' as large as the equivalent .7z files. We don't recommend using Windows'
built-in decompression as it can be painfully slow for large archives.</td></tr> built-in decompression as it can be painfully slow for large archives.</td></tr>
@@ -874,7 +873,7 @@ built-in decompression as it can be painfully slow for large archives.</td></tr>
<table class="docutils footnote" frame="void" id="pch" rules="none"> <table class="docutils footnote" frame="void" id="pch" rules="none">
<colgroup><col class="label" /><col /></colgroup> <colgroup><col class="label" /><col /></colgroup>
<tbody valign="top"> <tbody valign="top">
<tr><td class="label"><a class="fn-backref" href="#id6">[2]</a></td><td>There's no problem using Boost with precompiled headers; <tr><td class="label"><a class="fn-backref" href="#footnote-reference-2">[2]</a></td><td>There's no problem using Boost with precompiled headers;
these instructions merely avoid precompiled headers because it these instructions merely avoid precompiled headers because it
would require Visual Studio-specific changes to the source code would require Visual Studio-specific changes to the source code
used in the examples.</td></tr> used in the examples.</td></tr>
@@ -883,7 +882,7 @@ used in the examples.</td></tr>
<table class="docutils footnote" frame="void" id="continuation" rules="none"> <table class="docutils footnote" frame="void" id="continuation" rules="none">
<colgroup><col class="label" /><col /></colgroup> <colgroup><col class="label" /><col /></colgroup>
<tbody valign="top"> <tbody valign="top">
<tr><td class="label"><a class="fn-backref" href="#id15">[3]</a></td><td><p class="first">In this example, the caret character <tt class="docutils literal">^</tt> is a <tr><td class="label"><a class="fn-backref" href="#footnote-reference-4">[3]</a></td><td><p class="first">In this example, the caret character <tt class="docutils literal">^</tt> is a
way of continuing the command on multiple lines, and must be the way of continuing the command on multiple lines, and must be the
<strong>final character</strong> used on the line to be continued (i.e. do <strong>final character</strong> used on the line to be continued (i.e. do
not follow it with spaces). The command prompt responds with not follow it with spaces). The command prompt responds with
@@ -910,7 +909,7 @@ command-line argument contains spaces, as in</p>
<table class="docutils footnote" frame="void" id="warnings" rules="none"> <table class="docutils footnote" frame="void" id="warnings" rules="none">
<colgroup><col class="label" /><col /></colgroup> <colgroup><col class="label" /><col /></colgroup>
<tbody valign="top"> <tbody valign="top">
<tr><td class="label"><a class="fn-backref" href="#id8">[4]</a></td><td>Remember that warnings are specific to each compiler <tr><td class="label"><a class="fn-backref" href="#footnote-reference-3">[4]</a></td><td>Remember that warnings are specific to each compiler
implementation. The developer of a given Boost library might implementation. The developer of a given Boost library might
not have access to your compiler. Also, some warnings are not have access to your compiler. Also, some warnings are
extremely difficult to eliminate in generic code, to the point extremely difficult to eliminate in generic code, to the point
@@ -921,7 +920,7 @@ have any source code mechanism for suppressing warnings.</td></tr>
<table class="docutils footnote" frame="void" id="distinct" rules="none"> <table class="docutils footnote" frame="void" id="distinct" rules="none">
<colgroup><col class="label" /><col /></colgroup> <colgroup><col class="label" /><col /></colgroup>
<tbody valign="top"> <tbody valign="top">
<tr><td class="label"><a class="fn-backref" href="#id23">[5]</a></td><td>This convention distinguishes the static version of <tr><td class="label"><a class="fn-backref" href="#footnote-reference-5">[5]</a></td><td>This convention distinguishes the static version of
a Boost library from the import library for an a Boost library from the import library for an
identically-configured Boost DLL, which would otherwise have the identically-configured Boost DLL, which would otherwise have the
same name.</td></tr> same name.</td></tr>
@@ -930,7 +929,7 @@ same name.</td></tr>
<table class="docutils footnote" frame="void" id="debug-abi" rules="none"> <table class="docutils footnote" frame="void" id="debug-abi" rules="none">
<colgroup><col class="label" /><col /></colgroup> <colgroup><col class="label" /><col /></colgroup>
<tbody valign="top"> <tbody valign="top">
<tr><td class="label"><a class="fn-backref" href="#id24">[6]</a></td><td>These libraries were compiled without optimization <tr><td class="label"><a class="fn-backref" href="#footnote-reference-6">[6]</a></td><td>These libraries were compiled without optimization
or inlining, with full debug symbols enabled, and without or inlining, with full debug symbols enabled, and without
<tt class="docutils literal">NDEBUG</tt> <tt class="docutils literal">#define</tt>d. Although it's true that sometimes <tt class="docutils literal">NDEBUG</tt> <tt class="docutils literal">#define</tt>d. Although it's true that sometimes
these choices don't affect binary compatibility with other these choices don't affect binary compatibility with other

View File

@@ -183,7 +183,7 @@ command invokes Boost.Build to build the separately-compiled Boost
libraries. Please consult the `Boost.Build documentation`__ for a list libraries. Please consult the `Boost.Build documentation`__ for a list
of allowed options. of allowed options.
__ http://www.boost.org/build/doc/html/bbv2/overview/invocation.html __ ../../tools/build/doc/html/index.html#bbv2.overview.invocation
Or, Build Binaries From Source Or, Build Binaries From Source
------------------------------ ------------------------------
@@ -208,7 +208,7 @@ Be sure to read `this note`__ about the appearance of ``^``,
The option “\ **--build-type=complete**\ ” causes Boost.Build to build The option “\ **--build-type=complete**\ ” causes Boost.Build to build
all supported variants of the libraries. For instructions on how to all supported variants of the libraries. For instructions on how to
build only specific variants, please ask on the `Boost.Build mailing build only specific variants, please ask on the `Boost Users' mailing
list`_. list`_.
__ continuation_ __ continuation_