|
@@ -26,40 +26,40 @@ not supported—they may or may not work.</p>
|
|
|
<div class="contents topic" id="index">
|
|
<div class="contents topic" id="index">
|
|
|
<p class="topic-title first">Index</p>
|
|
<p class="topic-title first">Index</p>
|
|
|
<ul class="auto-toc simple">
|
|
<ul class="auto-toc simple">
|
|
|
-<li><a class="reference internal" href="#get-boost" id="id26">1 Get Boost</a></li>
|
|
|
|
|
-<li><a class="reference internal" href="#the-boost-distribution" id="id27">2 The Boost Distribution</a></li>
|
|
|
|
|
-<li><a class="reference internal" href="#header-only-libraries" id="id28">3 Header-Only Libraries</a></li>
|
|
|
|
|
-<li><a class="reference internal" href="#build-a-simple-program-using-boost" id="id29">4 Build a Simple Program Using Boost</a><ul class="auto-toc">
|
|
|
|
|
-<li><a class="reference internal" href="#build-from-the-visual-studio-ide" id="id30">4.1 Build From the Visual Studio IDE</a></li>
|
|
|
|
|
-<li><a class="reference internal" href="#or-build-from-the-command-prompt" id="id31">4.2 Or, Build From the Command Prompt</a></li>
|
|
|
|
|
-<li><a class="reference internal" href="#errors-and-warnings" id="id32">4.3 Errors and Warnings</a></li>
|
|
|
|
|
|
|
+<li><a class="reference internal" href="#get-boost" id="id29">1 Get Boost</a></li>
|
|
|
|
|
+<li><a class="reference internal" href="#the-boost-distribution" id="id30">2 The Boost Distribution</a></li>
|
|
|
|
|
+<li><a class="reference internal" href="#header-only-libraries" id="id31">3 Header-Only Libraries</a></li>
|
|
|
|
|
+<li><a class="reference internal" href="#build-a-simple-program-using-boost" id="id32">4 Build a Simple Program Using Boost</a><ul class="auto-toc">
|
|
|
|
|
+<li><a class="reference internal" href="#build-from-the-visual-studio-ide" id="id33">4.1 Build From the Visual Studio IDE</a></li>
|
|
|
|
|
+<li><a class="reference internal" href="#or-build-from-the-command-prompt" id="id34">4.2 Or, Build From the Command Prompt</a></li>
|
|
|
|
|
+<li><a class="reference internal" href="#errors-and-warnings" id="id35">4.3 Errors and Warnings</a></li>
|
|
|
</ul>
|
|
</ul>
|
|
|
</li>
|
|
</li>
|
|
|
-<li><a class="reference internal" href="#prepare-to-use-a-boost-library-binary" id="id33">5 Prepare to Use a Boost Library Binary</a><ul class="auto-toc">
|
|
|
|
|
-<li><a class="reference internal" href="#install-visual-studio-binaries" id="id34">5.1 Install Visual Studio Binaries</a></li>
|
|
|
|
|
-<li><a class="reference internal" href="#or-build-binaries-from-source" id="id35">5.2 Or, Build Binaries From Source</a><ul class="auto-toc">
|
|
|
|
|
-<li><a class="reference internal" href="#get-bjam" id="id36">5.2.1 Get <tt class="docutils literal"><span class="pre">bjam</span></tt></a></li>
|
|
|
|
|
-<li><a class="reference internal" href="#identify-your-toolset" id="id37">5.2.2 Identify Your Toolset</a></li>
|
|
|
|
|
-<li><a class="reference internal" href="#select-a-build-directory" id="id38">5.2.3 Select a Build Directory</a></li>
|
|
|
|
|
-<li><a class="reference internal" href="#invoke-bjam" id="id39">5.2.4 Invoke <tt class="docutils literal"><span class="pre">bjam</span></tt></a></li>
|
|
|
|
|
|
|
+<li><a class="reference internal" href="#prepare-to-use-a-boost-library-binary" id="id36">5 Prepare to Use a Boost Library Binary</a><ul class="auto-toc">
|
|
|
|
|
+<li><a class="reference internal" href="#install-visual-studio-binaries" id="id37">5.1 Install Visual Studio Binaries</a></li>
|
|
|
|
|
+<li><a class="reference internal" href="#or-build-binaries-from-source" id="id38">5.2 Or, Build Binaries From Source</a><ul class="auto-toc">
|
|
|
|
|
+<li><a class="reference internal" href="#get-bjam" id="id39">5.2.1 Get <tt class="docutils literal"><span class="pre">bjam</span></tt></a></li>
|
|
|
|
|
+<li><a class="reference internal" href="#identify-your-toolset" id="id40">5.2.2 Identify Your Toolset</a></li>
|
|
|
|
|
+<li><a class="reference internal" href="#select-a-build-directory" id="id41">5.2.3 Select a Build Directory</a></li>
|
|
|
|
|
+<li><a class="reference internal" href="#invoke-bjam" id="id42">5.2.4 Invoke <tt class="docutils literal"><span class="pre">bjam</span></tt></a></li>
|
|
|
</ul>
|
|
</ul>
|
|
|
</li>
|
|
</li>
|
|
|
-<li><a class="reference internal" href="#expected-build-output" id="id40">5.3 Expected Build Output</a></li>
|
|
|
|
|
-<li><a class="reference internal" href="#in-case-of-build-errors" id="id41">5.4 In Case of Build Errors</a></li>
|
|
|
|
|
|
|
+<li><a class="reference internal" href="#expected-build-output" id="id43">5.3 Expected Build Output</a></li>
|
|
|
|
|
+<li><a class="reference internal" href="#in-case-of-build-errors" id="id44">5.4 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="id42">6 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="id43">6.1 Link From Within the Visual Studio IDE</a></li>
|
|
|
|
|
-<li><a class="reference internal" href="#or-link-from-the-command-prompt" id="id44">6.2 Or, Link From the Command Prompt</a></li>
|
|
|
|
|
-<li><a class="reference internal" href="#library-naming" id="id45">6.3 Library Naming</a></li>
|
|
|
|
|
-<li><a class="reference internal" href="#test-your-program" id="id46">6.4 Test Your Program</a></li>
|
|
|
|
|
|
|
+<li><a class="reference internal" href="#link-your-program-to-a-boost-library" id="id45">6 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="id46">6.1 Link From Within the Visual Studio IDE</a></li>
|
|
|
|
|
+<li><a class="reference internal" href="#or-link-from-the-command-prompt" id="id47">6.2 Or, Link From the Command Prompt</a></li>
|
|
|
|
|
+<li><a class="reference internal" href="#library-naming" id="id48">6.3 Library Naming</a></li>
|
|
|
|
|
+<li><a class="reference internal" href="#test-your-program" id="id49">6.4 Test Your Program</a></li>
|
|
|
</ul>
|
|
</ul>
|
|
|
</li>
|
|
</li>
|
|
|
-<li><a class="reference internal" href="#conclusion-and-further-resources" id="id47">7 Conclusion and Further Resources</a></li>
|
|
|
|
|
|
|
+<li><a class="reference internal" href="#conclusion-and-further-resources" id="id50">7 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="#id26">1 Get Boost</a></h1>
|
|
|
|
|
|
|
+<h1><a class="toc-backref" href="#id29">1 Get Boost</a></h1>
|
|
|
<p>The easiest way to get a copy of Boost is to use an installer. The
|
|
<p>The easiest way to get a copy of Boost is to use an installer. The
|
|
|
<a class="reference external" href="http://www.boost.org/doc/libs/1_36_0/more/getting_started/index.html">Boost website version of this Getting Started guide</a> will have
|
|
<a class="reference external" href="http://www.boost.org/doc/libs/1_36_0/more/getting_started/index.html">Boost website version of this Getting Started guide</a> will have
|
|
|
undated information on installers as they become available, or see
|
|
undated information on installers as they become available, or see
|
|
@@ -79,7 +79,7 @@ distribution.<a class="footnote-reference" href="#zip" id="id2"><sup>1</sup></a>
|
|
|
<!-- 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="#id27">2 The Boost Distribution</a></h1>
|
|
|
|
|
|
|
+<h1><a class="toc-backref" href="#id30">2 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_39_0</strong><strong>\</strong> .................<em>The “boost root directory”</em>
|
|
<strong>boost_1_39_0</strong><strong>\</strong> .................<em>The “boost root directory”</em>
|
|
@@ -162,7 +162,7 @@ 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="#id28">3 Header-Only Libraries</a></h1>
|
|
|
|
|
|
|
+<h1><a class="toc-backref" href="#id31">3 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-nothing-to-build admonition">
|
|
@@ -202,7 +202,7 @@ use</strong>.</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="#id29">4 Build a Simple Program Using Boost</a></h1>
|
|
|
|
|
|
|
+<h1><a class="toc-backref" href="#id32">4 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
|
|
@@ -258,7 +258,7 @@ caret (<tt class="docutils literal"><span class="pre">^</span></tt>) at the end
|
|
|
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="#id30">4.1 Build From the Visual Studio IDE</a></h2>
|
|
|
|
|
|
|
+<span id="vs-header-only"></span><h2><a class="toc-backref" href="#id33">4.1 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> > <em>Project…</em></p>
|
|
<li><p class="first">From Visual Studio's <em>File</em> menu, select <em>New</em> > <em>Project…</em></p>
|
|
|
</li>
|
|
</li>
|
|
@@ -299,7 +299,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="#id31">4.2 Or, Build From the Command Prompt</a></h2>
|
|
|
|
|
|
|
+<h2><a class="toc-backref" href="#id34">4.2 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>
|
|
@@ -325,7 +325,7 @@ 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="#id32">4.3 Errors and Warnings</a></h2>
|
|
|
|
|
|
|
+<h2><a class="toc-backref" href="#id35">4.3 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="id7"><sup>5</sup></a> <strong>Errors are another matter</strong>. If you're
|
|
practical.<a class="footnote-reference" href="#warnings" id="id7"><sup>5</sup></a> <strong>Errors are another matter</strong>. If you're
|
|
@@ -338,11 +338,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="#id33">5 Prepare to Use a Boost Library Binary</a></h1>
|
|
|
|
|
|
|
+<h1><a class="toc-backref" href="#id36">5 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="install-visual-studio-binaries">
|
|
<div class="section" id="install-visual-studio-binaries">
|
|
|
-<h2><a class="toc-backref" href="#id34">5.1 Install Visual Studio Binaries</a></h2>
|
|
|
|
|
|
|
+<h2><a class="toc-backref" href="#id37">5.1 Install Visual Studio Binaries</a></h2>
|
|
|
<p>The installers supplied by BoostPro Computing will download and
|
|
<p>The installers supplied by BoostPro Computing will download and
|
|
|
install pre-compiled binaries into the <tt class="docutils literal"><span class="pre">lib\</span></tt> subdirectory of the
|
|
install pre-compiled binaries into the <tt class="docutils literal"><span class="pre">lib\</span></tt> subdirectory of the
|
|
|
boost root, typically <tt class="docutils literal"><span class="pre">C:\Program</span> <span class="pre">Files\boost\</span></tt><tt class="docutils literal"><span class="pre">boost_1_39_0</span></tt><tt class="docutils literal"><span class="pre">\lib\</span></tt>. If you installed
|
|
boost root, typically <tt class="docutils literal"><span class="pre">C:\Program</span> <span class="pre">Files\boost\</span></tt><tt class="docutils literal"><span class="pre">boost_1_39_0</span></tt><tt class="docutils literal"><span class="pre">\lib\</span></tt>. If you installed
|
|
@@ -352,7 +352,7 @@ now.</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-binaries-from-source">
|
|
<div class="section" id="or-build-binaries-from-source">
|
|
|
-<h2><a class="toc-backref" href="#id35">5.2 Or, Build Binaries From Source</a></h2>
|
|
|
|
|
|
|
+<h2><a class="toc-backref" href="#id38">5.2 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/index.html">Boost.Build</a> to create your
|
|
|
own binaries.</p>
|
|
own binaries.</p>
|
|
@@ -364,7 +364,7 @@ installing software. To use it, you'll need an executable called
|
|
|
<tt class="docutils literal"><span class="pre">bjam</span></tt>.</p>
|
|
<tt class="docutils literal"><span class="pre">bjam</span></tt>.</p>
|
|
|
<!-- .. _Boost.Jam documentation: Boost.Jam_ -->
|
|
<!-- .. _Boost.Jam documentation: Boost.Jam_ -->
|
|
|
<div class="section" id="get-bjam">
|
|
<div class="section" id="get-bjam">
|
|
|
-<h3><a class="toc-backref" href="#id36">5.2.1 Get <tt class="docutils literal"><span class="pre">bjam</span></tt></a></h3>
|
|
|
|
|
|
|
+<h3><a class="toc-backref" href="#id39">5.2.1 Get <tt class="docutils literal"><span class="pre">bjam</span></tt></a></h3>
|
|
|
<p><tt class="docutils literal"><span class="pre">bjam</span></tt> is the <a class="reference internal" href="#command-line-tool">command-line tool</a> that drives the Boost Build
|
|
<p><tt class="docutils literal"><span class="pre">bjam</span></tt> is the <a class="reference internal" href="#command-line-tool">command-line tool</a> that drives the Boost Build
|
|
|
system. To build Boost binaries, you'll invoke <tt class="docutils literal"><span class="pre">bjam</span></tt> from the
|
|
system. To build Boost binaries, you'll invoke <tt class="docutils literal"><span class="pre">bjam</span></tt> from the
|
|
|
Boost root.</p>
|
|
Boost root.</p>
|
|
@@ -376,9 +376,10 @@ see the list of directories in your PATH, separated by semicolons,
|
|
|
by typing “<tt class="docutils literal"><span class="pre">PATH</span></tt>” at the command prompt.</p>
|
|
by typing “<tt class="docutils literal"><span class="pre">PATH</span></tt>” at the command prompt.</p>
|
|
|
</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="#id37">5.2.2 Identify Your Toolset</a></h3>
|
|
|
|
|
|
|
+<span id="toolset-name"></span><span id="toolset"></span><h3><a class="toc-backref" href="#id40">5.2.2 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.</p>
|
|
|
|
|
|
|
+following table (an up-to-date list is always available <a class="reference external" href="http://www.boost.org/boost-build2/doc/html/bbv2/reference/tools.html">in the
|
|
|
|
|
+Boost.Build documentation</a>).</p>
|
|
|
<div class="note">
|
|
<div class="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
|
|
@@ -448,10 +449,6 @@ operating system.</td>
|
|
|
<td>Intel</td>
|
|
<td>Intel</td>
|
|
|
<td> </td>
|
|
<td> </td>
|
|
|
</tr>
|
|
</tr>
|
|
|
-<tr><td><tt class="docutils literal"><span class="pre">kylix</span></tt></td>
|
|
|
|
|
-<td>Borland</td>
|
|
|
|
|
-<td> </td>
|
|
|
|
|
-</tr>
|
|
|
|
|
<tr><td><tt class="docutils literal"><span class="pre">msvc</span></tt></td>
|
|
<tr><td><tt class="docutils literal"><span class="pre">msvc</span></tt></td>
|
|
|
<td>Microsoft</td>
|
|
<td>Microsoft</td>
|
|
|
<td> </td>
|
|
<td> </td>
|
|
@@ -481,7 +478,7 @@ 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="id12"></span><span id="build-directory"></span><h3><a class="toc-backref" href="#id38">5.2.3 Select a Build Directory</a></h3>
|
|
|
|
|
|
|
+<span id="id13"></span><span id="build-directory"></span><h3><a class="toc-backref" href="#id41">5.2.3 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/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
|
|
@@ -489,13 +486,15 @@ default Boost.Build will create a <tt class="docutils literal"><span class="pre"
|
|
|
purpose in your current working directory.</p>
|
|
purpose in your current working directory.</p>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="section" id="invoke-bjam">
|
|
<div class="section" id="invoke-bjam">
|
|
|
-<h3><a class="toc-backref" href="#id39">5.2.4 Invoke <tt class="docutils literal"><span class="pre">bjam</span></tt></a></h3>
|
|
|
|
|
|
|
+<h3><a class="toc-backref" href="#id42">5.2.4 Invoke <tt class="docutils literal"><span class="pre">bjam</span></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"><span class="pre">bjam</span></tt> as follows:</p>
|
|
invoke <tt class="docutils literal"><span class="pre">bjam</span></tt> as follows:</p>
|
|
|
<pre class="literal-block">
|
|
<pre class="literal-block">
|
|
|
-bjam <strong>--build-dir=</strong><a class="reference internal" href="#id12"><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
|
|
|
|
|
|
|
+bjam <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
|
|
|
</pre>
|
|
</pre>
|
|
|
-<p>For example, your session might look like this:<a class="footnote-reference" href="#continuation" id="id13"><sup>4</sup></a></p>
|
|
|
|
|
|
|
+<p>For a complete description of these and other invocation options,
|
|
|
|
|
+please see the <a class="reference external" href="http://www.boost.org/boost-build2/doc/html/bbv2/advanced/invocation.html">Boost.Build documentation</a>.</p>
|
|
|
|
|
+<p>For example, your session might look like this:<a class="footnote-reference" href="#continuation" id="id15"><sup>4</sup></a></p>
|
|
|
<pre class="literal-block">
|
|
<pre class="literal-block">
|
|
|
C:\WINDOWS> cd <tt class="docutils literal"><span class="pre">C:\Program</span> <span class="pre">Files\boost\</span></tt><tt class="docutils literal"><span class="pre">boost_1_39_0</span></tt>
|
|
C:\WINDOWS> cd <tt class="docutils literal"><span class="pre">C:\Program</span> <span class="pre">Files\boost\</span></tt><tt class="docutils literal"><span class="pre">boost_1_39_0</span></tt>
|
|
|
<tt class="docutils literal"><span class="pre">C:\Program</span> <span class="pre">Files\boost\</span></tt><tt class="docutils literal"><span class="pre">boost_1_39_0</span></tt>> bjam <strong>^</strong>
|
|
<tt class="docutils literal"><span class="pre">C:\Program</span> <span class="pre">Files\boost\</span></tt><tt class="docutils literal"><span class="pre">boost_1_39_0</span></tt>> bjam <strong>^</strong>
|
|
@@ -542,7 +541,7 @@ file by appending “<tt class="docutils literal"><span class="pre">>build.lo
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="section" id="expected-build-output">
|
|
<div class="section" id="expected-build-output">
|
|
|
-<h2><a class="toc-backref" href="#id40">5.3 Expected Build Output</a></h2>
|
|
|
|
|
|
|
+<h2><a class="toc-backref" href="#id43">5.3 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>
|
|
@@ -566,7 +565,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="#id41">5.4 In Case of Build Errors</a></h2>
|
|
|
|
|
|
|
+<h2><a class="toc-backref" href="#id44">5.4 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
|
|
@@ -574,17 +573,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
|
|
|
-in the <a class="reference external" href="../../tools/build/index.html">Boost.Build documentation</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 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>
|
|
|
|
|
|
|
+<a class="reference external" href="http://www.boost.org/boost-build2/doc/html/bbv2/advanced/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
|
|
|
|
|
+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>
|
|
|
<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="#id42">6 Link Your Program to a Boost Library</a></h1>
|
|
|
|
|
|
|
+<h1><a class="toc-backref" href="#id45">6 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
|
|
@@ -629,7 +627,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="#id43">6.1 Link From Within the Visual Studio IDE</a></h2>
|
|
|
|
|
|
|
+<h2><a class="toc-backref" href="#id46">6.1 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">
|
|
@@ -643,7 +641,7 @@ e.g. <tt class="docutils literal"><span class="pre">C:\Program</span> <span clas
|
|
|
<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="#id44">6.2 Or, Link From the Command Prompt</a></h2>
|
|
|
|
|
|
|
+<h2><a class="toc-backref" href="#id47">6.2 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
|
|
@@ -654,7 +652,7 @@ cl /EHsc /I <em>path\to\</em><tt class="docutils literal"><span class="pre">boos
|
|
|
</pre>
|
|
</pre>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="section" id="library-naming">
|
|
<div class="section" id="library-naming">
|
|
|
-<h2><a class="toc-backref" href="#id45">6.3 Library Naming</a></h2>
|
|
|
|
|
|
|
+<h2><a class="toc-backref" href="#id48">6.3 Library Naming</a></h2>
|
|
|
<div class="note">
|
|
<div class="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,
|
|
@@ -676,7 +674,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"><span class="pre">lib</span></tt> prefix; import libraries and DLLs do
|
|
libraries use the <tt class="docutils literal"><span class="pre">lib</span></tt> prefix; import libraries and DLLs do
|
|
|
-not.<a class="footnote-reference" href="#distinct" id="id20"><sup>6</sup></a></dd>
|
|
|
|
|
|
|
+not.<a class="footnote-reference" href="#distinct" id="id23"><sup>6</sup></a></dd>
|
|
|
<dt><tt class="docutils literal"><span class="pre">boost_regex</span></tt></dt>
|
|
<dt><tt class="docutils literal"><span class="pre">boost_regex</span></tt></dt>
|
|
|
<dd><em>Library name</em>: all boost library filenames begin with <tt class="docutils literal"><span class="pre">boost_</span></tt>.</dd>
|
|
<dd><em>Library name</em>: all boost library filenames begin with <tt class="docutils literal"><span class="pre">boost_</span></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>
|
|
@@ -714,14 +712,14 @@ libraries.</td>
|
|
|
<td>using a special <a class="reference external" href="../../libs/python/doc/building.html#variants">debug build of Python</a>.</td>
|
|
<td>using a special <a class="reference external" href="../../libs/python/doc/building.html#variants">debug build of Python</a>.</td>
|
|
|
</tr>
|
|
</tr>
|
|
|
<tr><td><tt class="docutils literal"><span class="pre">d</span></tt></td>
|
|
<tr><td><tt class="docutils literal"><span class="pre">d</span></tt></td>
|
|
|
-<td>building a debug version of your code.<a class="footnote-reference" href="#debug-abi" id="id21"><sup>7</sup></a></td>
|
|
|
|
|
|
|
+<td>building a debug version of your code.<a class="footnote-reference" href="#debug-abi" id="id24"><sup>7</sup></a></td>
|
|
|
</tr>
|
|
</tr>
|
|
|
<tr><td><tt class="docutils literal"><span class="pre">p</span></tt></td>
|
|
<tr><td><tt class="docutils literal"><span class="pre">p</span></tt></td>
|
|
|
<td>using the STLPort standard library rather than the default one supplied with
|
|
<td>using the STLPort standard library rather than the default one supplied with
|
|
|
your compiler.</td>
|
|
your compiler.</td>
|
|
|
</tr>
|
|
</tr>
|
|
|
<tr><td><tt class="docutils literal"><span class="pre">n</span></tt></td>
|
|
<tr><td><tt class="docutils literal"><span class="pre">n</span></tt></td>
|
|
|
-<td>using STLPort's deprecated “native iostreams” feature.<a class="footnote-reference" href="#native" id="id22"><sup>8</sup></a></td>
|
|
|
|
|
|
|
+<td>using STLPort's deprecated “native iostreams” feature.<a class="footnote-reference" href="#native" id="id25"><sup>8</sup></a></td>
|
|
|
</tr>
|
|
</tr>
|
|
|
</tbody>
|
|
</tbody>
|
|
|
</table>
|
|
</table>
|
|
@@ -753,7 +751,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="#id46">6.4 Test Your Program</a></h2>
|
|
|
|
|
|
|
+<h2><a class="toc-backref" href="#id49">6.4 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"><span class="pre">jayne.txt</span></tt>:</p>
|
|
file. Copy it out of your browser and save it as <tt class="docutils literal"><span class="pre">jayne.txt</span></tt>:</p>
|
|
|
<pre class="literal-block">
|
|
<pre class="literal-block">
|
|
@@ -775,7 +773,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="#id47">7 Conclusion and Further Resources</a></h1>
|
|
|
|
|
|
|
+<h1><a class="toc-backref" href="#id50">7 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
|
|
@@ -832,7 +830,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="#id13">[4]</a></td><td><p class="first">In this example, the caret character <tt class="docutils literal"><span class="pre">^</span></tt> is a
|
|
|
|
|
|
|
+<tr><td class="label"><a class="fn-backref" href="#id15">[4]</a></td><td><p class="first">In this example, the caret character <tt class="docutils literal"><span class="pre">^</span></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
|
|
@@ -870,7 +868,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="#id20">[6]</a></td><td>This convention distinguishes the static version of
|
|
|
|
|
|
|
+<tr><td class="label"><a class="fn-backref" href="#id23">[6]</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>
|
|
@@ -879,7 +877,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="#id21">[7]</a></td><td>These libraries were compiled without optimization
|
|
|
|
|
|
|
+<tr><td class="label"><a class="fn-backref" href="#id24">[7]</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"><span class="pre">NDEBUG</span></tt> <tt class="docutils literal"><span class="pre">#define</span></tt>d. Although it's true that sometimes
|
|
<tt class="docutils literal"><span class="pre">NDEBUG</span></tt> <tt class="docutils literal"><span class="pre">#define</span></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
|
|
@@ -889,7 +887,7 @@ compiled code, you can't count on that with Boost libraries.</td></tr>
|
|
|
<table class="docutils footnote" frame="void" id="native" rules="none">
|
|
<table class="docutils footnote" frame="void" id="native" 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="#id22">[8]</a></td><td>This feature of STLPort is deprecated because it's
|
|
|
|
|
|
|
+<tr><td class="label"><a class="fn-backref" href="#id25">[8]</a></td><td>This feature of STLPort is deprecated because it's
|
|
|
impossible to make it work transparently to the user; we don't
|
|
impossible to make it work transparently to the user; we don't
|
|
|
recommend it.</td></tr>
|
|
recommend it.</td></tr>
|
|
|
</tbody>
|
|
</tbody>
|