1
0
mirror of https://github.com/boostorg/more.git synced 2025-03-24 13:20:07 +08:00

Refine for 1.36.0

[SVN r48087]
This commit is contained in:
Beman Dawes 2008-08-11 16:44:49 +00:00
parent 7840c18875
commit 2b07e977a5
5 changed files with 108 additions and 77 deletions

View File

@ -123,4 +123,4 @@ invoke ``bjam`` as follows:
.. parsed-literal::
bjam **--build-dir=**\ |build-directory|_ **--toolset=**\ |toolset-name|_ stage
bjam **--build-dir=**\ |build-directory|_ **--toolset=**\ |toolset-name|_ *[*\ **--build-type=complete**\ *]* stage

View File

@ -421,7 +421,7 @@ purpose in your current working directory.</p>
<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>
<pre class="literal-block">
bjam <strong>--build-dir=</strong><a class="reference internal" href="#id10"><em>build-directory</em></a> <strong>--toolset=</strong><a class="reference internal" href="#toolset-name"><em>toolset-name</em></a> stage
bjam <strong>--build-dir=</strong><a class="reference internal" href="#id10"><em>build-directory</em></a> <strong>--toolset=</strong><a class="reference internal" href="#toolset-name"><em>toolset-name</em></a> <em>[</em><strong>--build-type=complete</strong><em>]</em> stage
</pre>
<p>For example, your session might look like this:</p>
<pre class="literal-block">
@ -431,7 +431,7 @@ $ bjam <strong>--build-dir=</strong>/tmp/build-boost <strong>--toolset=</strong>
<p>That will build static and shared non-debug multi-threaded variations of the libraries. To build all variations:</p>
<pre class="literal-block">
$ cd ~/<tt class="docutils literal"><span class="pre">boost_1_36_0</span></tt>
$ bjam <strong>--build-dir=</strong>/tmp/build-boost <strong>--toolset=</strong>gcc <strong>--build-type=</strong>complete stage
$ bjam <strong>--build-dir=</strong>/tmp/build-boost <strong>--toolset=</strong>gcc <strong>--build-type=complete</strong> stage
</pre>
<!-- Copyright David Abrahams 2006. Distributed under the Boost -->
<!-- Software License, Version 1.0. (See accompanying -->

View File

@ -147,7 +147,7 @@ That will build static and shared non-debug multi-threaded variations of the lib
.. parsed-literal::
$ cd ~/|boost_ver|
$ bjam **--build-dir=**\ /tmp/build-boost **--toolset=**\ gcc **--build-type=**\ complete stage
$ bjam **--build-dir=**\ /tmp/build-boost **--toolset=**\ gcc **--build-type=complete** stage
.. include:: detail/build-from-source-tail.rst

View File

@ -26,57 +26,58 @@ not supported—they may or may not work.</p>
<div class="contents topic" id="index">
<p class="topic-title first">Index</p>
<ul class="auto-toc simple">
<li><a class="reference internal" href="#get-boost" id="id24">1&nbsp;&nbsp;&nbsp;Get Boost</a></li>
<li><a class="reference internal" href="#the-boost-distribution" id="id25">2&nbsp;&nbsp;&nbsp;The Boost Distribution</a></li>
<li><a class="reference internal" href="#header-only-libraries" id="id26">3&nbsp;&nbsp;&nbsp;Header-Only Libraries</a></li>
<li><a class="reference internal" href="#build-a-simple-program-using-boost" id="id27">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="id28">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="id29">4.2&nbsp;&nbsp;&nbsp;Or, Build From the Command Prompt</a></li>
<li><a class="reference internal" href="#errors-and-warnings" id="id30">4.3&nbsp;&nbsp;&nbsp;Errors and Warnings</a></li>
<li><a class="reference internal" href="#get-boost" id="id26">1&nbsp;&nbsp;&nbsp;Get Boost</a></li>
<li><a class="reference internal" href="#the-boost-distribution" id="id27">2&nbsp;&nbsp;&nbsp;The Boost Distribution</a></li>
<li><a class="reference internal" href="#header-only-libraries" id="id28">3&nbsp;&nbsp;&nbsp;Header-Only Libraries</a></li>
<li><a class="reference internal" href="#build-a-simple-program-using-boost" id="id29">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="id30">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="id31">4.2&nbsp;&nbsp;&nbsp;Or, Build From the Command Prompt</a></li>
<li><a class="reference internal" href="#errors-and-warnings" id="id32">4.3&nbsp;&nbsp;&nbsp;Errors and Warnings</a></li>
</ul>
</li>
<li><a class="reference internal" href="#prepare-to-use-a-boost-library-binary" id="id31">5&nbsp;&nbsp;&nbsp;Prepare to Use a Boost Library Binary</a><ul class="auto-toc">
<li><a class="reference internal" href="#install-visual-studio-2005-or-net-2003-binaries" id="id32">5.1&nbsp;&nbsp;&nbsp;Install Visual Studio (2005 or .NET 2003) Binaries</a></li>
<li><a class="reference internal" href="#or-build-binaries-from-source" id="id33">5.2&nbsp;&nbsp;&nbsp;Or, Build Binaries From Source</a><ul class="auto-toc">
<li><a class="reference internal" href="#get-bjam" id="id34">5.2.1&nbsp;&nbsp;&nbsp;Get <tt class="docutils literal"><span class="pre">bjam</span></tt></a></li>
<li><a class="reference internal" href="#identify-your-toolset" id="id35">5.2.2&nbsp;&nbsp;&nbsp;Identify Your Toolset</a></li>
<li><a class="reference internal" href="#select-a-build-directory" id="id36">5.2.3&nbsp;&nbsp;&nbsp;Select a Build Directory</a></li>
<li><a class="reference internal" href="#invoke-bjam" id="id37">5.2.4&nbsp;&nbsp;&nbsp;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="id33">5&nbsp;&nbsp;&nbsp;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&nbsp;&nbsp;&nbsp;Install Visual Studio Binaries</a></li>
<li><a class="reference internal" href="#or-build-binaries-from-source" id="id35">5.2&nbsp;&nbsp;&nbsp;Or, Build Binaries From Source</a><ul class="auto-toc">
<li><a class="reference internal" href="#get-bjam" id="id36">5.2.1&nbsp;&nbsp;&nbsp;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&nbsp;&nbsp;&nbsp;Identify Your Toolset</a></li>
<li><a class="reference internal" href="#select-a-build-directory" id="id38">5.2.3&nbsp;&nbsp;&nbsp;Select a Build Directory</a></li>
<li><a class="reference internal" href="#invoke-bjam" id="id39">5.2.4&nbsp;&nbsp;&nbsp;Invoke <tt class="docutils literal"><span class="pre">bjam</span></tt></a></li>
</ul>
</li>
<li><a class="reference internal" href="#expected-build-output" id="id38">5.3&nbsp;&nbsp;&nbsp;Expected Build Output</a></li>
<li><a class="reference internal" href="#in-case-of-build-errors" id="id39">5.4&nbsp;&nbsp;&nbsp;In Case of Build Errors</a></li>
<li><a class="reference internal" href="#expected-build-output" id="id40">5.3&nbsp;&nbsp;&nbsp;Expected Build Output</a></li>
<li><a class="reference internal" href="#in-case-of-build-errors" id="id41">5.4&nbsp;&nbsp;&nbsp;In Case of Build Errors</a></li>
</ul>
</li>
<li><a class="reference internal" href="#link-your-program-to-a-boost-library" id="id40">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="id41">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="id42">6.2&nbsp;&nbsp;&nbsp;Or, Link From the Command Prompt</a></li>
<li><a class="reference internal" href="#library-naming" id="id43">6.3&nbsp;&nbsp;&nbsp;Library Naming</a></li>
<li><a class="reference internal" href="#test-your-program" id="id44">6.4&nbsp;&nbsp;&nbsp;Test Your Program</a></li>
<li><a class="reference internal" href="#link-your-program-to-a-boost-library" id="id42">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="id43">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="id44">6.2&nbsp;&nbsp;&nbsp;Or, Link From the Command Prompt</a></li>
<li><a class="reference internal" href="#library-naming" id="id45">6.3&nbsp;&nbsp;&nbsp;Library Naming</a></li>
<li><a class="reference internal" href="#test-your-program" id="id46">6.4&nbsp;&nbsp;&nbsp;Test Your Program</a></li>
</ul>
</li>
<li><a class="reference internal" href="#conclusion-and-further-resources" id="id45">7&nbsp;&nbsp;&nbsp;Conclusion and Further Resources</a></li>
<li><a class="reference internal" href="#conclusion-and-further-resources" id="id47">7&nbsp;&nbsp;&nbsp;Conclusion and Further Resources</a></li>
</ul>
</div>
<div class="section" id="get-boost">
<h1><a class="toc-backref" href="#id24">1&nbsp;&nbsp;&nbsp;Get Boost</a></h1>
<p>The easiest way to get a copy of Boost is to use the <a class="reference external" href="http://www.boost-consulting.com/download/windows">installer</a>
provided by <a class="reference external" href="http://www.boost-consulting.com">Boost Consulting</a>. We especially recommend this
method if you use Microsoft Visual Studio .NET 2003 or Microsoft
Visual Studio 2005, because the installer can download and install
<h1><a class="toc-backref" href="#id26">1&nbsp;&nbsp;&nbsp;Get Boost</a></h1>
<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 undated information on installers as they become available,
or see <a class="reference external" href="http://sourceforge.net/project/showfiles.php?group_id=7586&amp;package_id=8041">Boost downloads</a> or the <a class="reference external" href="http://www.boostpro.com/products/free">installer</a> provided by <a class="reference external" href="http://www.boostpro.com">BoostPro Computing</a>. We especially recommend using
an installer if you use Microsoft Visual Studio, because the installer can download and install
precompiled library binaries, saving you the trouble of building
them yourself. To complete this tutorial, you'll need to at least
install the <a class="reference external" href="../../libs/regex/index.html">Boost.Regex</a> binaries when given the option.</p>
<p>If you're using an earlier version of Visual Studio or some other
compiler, or if you prefer to build everything yourself, you can
download <a class="reference external" href="http://sourceforge.net/project/showfiles.php?group_id=7586&amp;package_id=8041"><tt class="docutils literal"><span class="pre">boost_1_36_0</span></tt><tt class="docutils literal"><span class="pre">.exe</span></tt></a> and run it to install a complete Boost
download <a class="reference external" href="http://sourceforge.net/project/showfiles.php?group_id=7586&amp;package_id=8041"><tt class="docutils literal"><span class="pre">boost_1_36_0</span></tt><tt class="docutils literal"><span class="pre">.7z</span></tt></a> or <a class="reference external" href="http://sourceforge.net/project/showfiles.php?group_id=7586&amp;package_id=8041"><tt class="docutils literal"><span class="pre">boost_1_36_0</span></tt><tt class="docutils literal"><span class="pre">.zip</span></tt></a> and unpack it to install a complete Boost
distribution.<a class="footnote-reference" href="#zip" id="id2"><sup>1</sup></a></p>
<!-- Copyright David Abrahams 2006. Distributed under the Boost -->
<!-- Software License, Version 1.0. (See accompanying -->
<!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -->
</div>
<div class="section" id="the-boost-distribution">
<h1><a class="toc-backref" href="#id25">2&nbsp;&nbsp;&nbsp;The Boost Distribution</a></h1>
<h1><a class="toc-backref" href="#id27">2&nbsp;&nbsp;&nbsp;The Boost Distribution</a></h1>
<p>This is a sketch of the resulting directory structure:</p>
<pre class="literal-block">
<strong>boost_1_36_0</strong><strong>\</strong> .................<em>The “boost root directory”</em>
@ -159,7 +160,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) -->
</div>
<div class="section" id="header-only-libraries">
<h1><a class="toc-backref" href="#id26">3&nbsp;&nbsp;&nbsp;Header-Only Libraries</a></h1>
<h1><a class="toc-backref" href="#id28">3&nbsp;&nbsp;&nbsp;Header-Only Libraries</a></h1>
<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>
<div class="admonition-nothing-to-build admonition">
@ -199,7 +200,7 @@ use</strong>.</li>
<!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -->
</div>
<div class="section" id="build-a-simple-program-using-boost">
<h1><a class="toc-backref" href="#id27">4&nbsp;&nbsp;&nbsp;Build a Simple Program Using Boost</a></h1>
<h1><a class="toc-backref" href="#id29">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.
The following program reads a sequence of integers from standard
input, uses Boost.Lambda to multiply each number by three, and
@ -255,7 +256,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>
</div>
<div class="section" id="build-from-the-visual-studio-ide">
<span id="vs-header-only"></span><h2><a class="toc-backref" href="#id28">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="#id30">4.1&nbsp;&nbsp;&nbsp;Build From the Visual Studio IDE</a></h2>
<ul>
<li><p class="first">From Visual Studio's <em>File</em> menu, select <em>New</em> &gt; <em>Project…</em></p>
</li>
@ -296,7 +297,7 @@ Return key.</p>
<p><a class="reference internal" href="#errors-and-warnings"><em>skip to the next step</em></a></p>
</div>
<div class="section" id="or-build-from-the-command-prompt">
<h2><a class="toc-backref" href="#id29">4.2&nbsp;&nbsp;&nbsp;Or, Build From the Command Prompt</a></h2>
<h2><a class="toc-backref" href="#id31">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
Studio 2005 user, select</p>
<blockquote>
@ -322,7 +323,7 @@ echo 1 2 3 | example
<!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -->
</div>
<div class="section" id="errors-and-warnings">
<h2><a class="toc-backref" href="#id30">4.3&nbsp;&nbsp;&nbsp;Errors and Warnings</a></h2>
<h2><a class="toc-backref" href="#id32">4.3&nbsp;&nbsp;&nbsp;Errors and Warnings</a></h2>
<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
practical.<a class="footnote-reference" href="#warnings" id="id7"><sup>5</sup></a> <strong>Errors are another matter</strong>. If you're
@ -335,12 +336,12 @@ correctly identified the <a class="reference internal" href="#boost-root-directo
</div>
</div>
<div class="section" id="prepare-to-use-a-boost-library-binary">
<h1><a class="toc-backref" href="#id31">5&nbsp;&nbsp;&nbsp;Prepare to Use a Boost Library Binary</a></h1>
<h1><a class="toc-backref" href="#id33">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,
you'll need to acquire library binaries.</p>
<div class="section" id="install-visual-studio-2005-or-net-2003-binaries">
<h2><a class="toc-backref" href="#id32">5.1&nbsp;&nbsp;&nbsp;Install Visual Studio (2005 or .NET 2003) Binaries</a></h2>
<p>The <a class="reference external" href="http://www.boost-consulting.com/download/windows">installer</a> supplied by Boost Consulting will download and
<div class="section" id="install-visual-studio-binaries">
<h2><a class="toc-backref" href="#id34">5.1&nbsp;&nbsp;&nbsp;Install Visual Studio Binaries</a></h2>
<p>The installers will download and
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_36_0</span></tt><tt class="docutils literal"><span class="pre">\lib\</span></tt>. If you installed
all variants of the <a class="reference external" href="../../libs/regex/index.html">Boost.Regex</a> binary, you're done with this
@ -349,7 +350,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>
</div>
<div class="section" id="or-build-binaries-from-source">
<h2><a class="toc-backref" href="#id33">5.2&nbsp;&nbsp;&nbsp;Or, Build Binaries From Source</a></h2>
<h2><a class="toc-backref" href="#id35">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
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>
@ -361,7 +362,7 @@ installing software. To use it, you'll need an executable called
<tt class="docutils literal"><span class="pre">bjam</span></tt>.</p>
<!-- .. _Boost.Jam documentation: Boost.Jam_ -->
<div class="section" id="get-bjam">
<h3><a class="toc-backref" href="#id34">5.2.1&nbsp;&nbsp;&nbsp;Get <tt class="docutils literal"><span class="pre">bjam</span></tt></a></h3>
<h3><a class="toc-backref" href="#id36">5.2.1&nbsp;&nbsp;&nbsp;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
system. To build Boost binaries, you'll invoke <tt class="docutils literal"><span class="pre">bjam</span></tt> from the
Boost root.</p>
@ -370,7 +371,7 @@ Alternatively, you can build <tt class="docutils literal"><span class="pre">bjam
instructions</a>.</p>
</div>
<div class="section" id="identify-your-toolset">
<span id="toolset-name"></span><span id="toolset"></span><h3><a class="toc-backref" href="#id35">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="#id37">5.2.2&nbsp;&nbsp;&nbsp;Identify Your Toolset</a></h3>
<p>First, find the toolset corresponding to your compiler in the
following table.</p>
<div class="note">
@ -475,7 +476,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>
</div>
<div class="section" id="select-a-build-directory">
<span id="id12"></span><span id="build-directory"></span><h3><a class="toc-backref" href="#id36">5.2.3&nbsp;&nbsp;&nbsp;Select a Build Directory</a></h3>
<span id="id12"></span><span id="build-directory"></span><h3><a class="toc-backref" href="#id38">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
building into the <strong>build directory</strong>. If your Boost root
directory is writable, this step isn't strictly necessary: by
@ -483,11 +484,11 @@ default Boost.Build will create a <tt class="docutils literal"><span class="pre"
purpose in your current working directory.</p>
</div>
<div class="section" id="invoke-bjam">
<h3><a class="toc-backref" href="#id37">5.2.4&nbsp;&nbsp;&nbsp;Invoke <tt class="docutils literal"><span class="pre">bjam</span></tt></a></h3>
<h3><a class="toc-backref" href="#id39">5.2.4&nbsp;&nbsp;&nbsp;Invoke <tt class="docutils literal"><span class="pre">bjam</span></tt></a></h3>
<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>
<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> stage
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> <em>[</em><strong>--build-type=complete</strong><em>]</em> stage
</pre>
<p>For example, your session might look like this:<a class="footnote-reference" href="#continuation" id="id13"><sup>4</sup></a></p>
<pre class="literal-block">
@ -498,6 +499,14 @@ More? <strong>--toolset=</strong>msvc stage
</pre>
<p>Be sure to read <a class="reference internal" href="#continuation">this note</a> about the appearance of <tt class="docutils literal"><span class="pre">^</span></tt>,
<tt class="docutils literal"><span class="pre">More?</span></tt> and quotation marks (<tt class="docutils literal"><span class="pre">&quot;</span></tt>) in that line.</p>
<p>The above example session will build static and shared non-debug multi-threaded
variations of the libraries. To build all variations:</p>
<pre class="literal-block">
C:\WINDOWS&gt; 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_36_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_36_0</span></tt>&gt; bjam <strong>^</strong>
More? <strong>--build-dir=</strong>&quot;C:\Documents and Settings\dave\build-boost&quot; <strong>^</strong>
More? <strong>--toolset=</strong>msvc <strong>--build-type=complete</strong> stage
</pre>
<!-- Copyright David Abrahams 2006. Distributed under the Boost -->
<!-- Software License, Version 1.0. (See accompanying -->
<!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -->
@ -525,7 +534,7 @@ be interested in:</p>
</div>
</div>
<div class="section" id="expected-build-output">
<h2><a class="toc-backref" href="#id38">5.3&nbsp;&nbsp;&nbsp;Expected Build Output</a></h2>
<h2><a class="toc-backref" href="#id40">5.3&nbsp;&nbsp;&nbsp;Expected Build Output</a></h2>
<p>During the process of building Boost libraries, you can expect to
see some messages printed on the console. These may include</p>
<ul>
@ -549,7 +558,7 @@ look something like:</p>
</ul>
</div>
<div class="section" id="in-case-of-build-errors">
<h2><a class="toc-backref" href="#id39">5.4&nbsp;&nbsp;&nbsp;In Case of Build Errors</a></h2>
<h2><a class="toc-backref" href="#id41">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
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
@ -567,7 +576,7 @@ questions about configuring Boost for your compiler to the
</div>
</div>
<div class="section" id="link-your-program-to-a-boost-library">
<h1><a class="toc-backref" href="#id40">6&nbsp;&nbsp;&nbsp;Link Your Program to a Boost Library</a></h1>
<h1><a class="toc-backref" href="#id42">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
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
@ -612,7 +621,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>
</div>
<div class="section" id="link-from-within-the-visual-studio-ide">
<h2><a class="toc-backref" href="#id41">6.1&nbsp;&nbsp;&nbsp;Link From Within the Visual Studio IDE</a></h2>
<h2><a class="toc-backref" href="#id43">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
earlier:</p>
<ol class="arabic simple">
@ -626,7 +635,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>
</div>
<div class="section" id="or-link-from-the-command-prompt">
<h2><a class="toc-backref" href="#id42">6.2&nbsp;&nbsp;&nbsp;Or, Link From the Command Prompt</a></h2>
<h2><a class="toc-backref" href="#id44">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
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
@ -637,7 +646,7 @@ cl /EHsc /I <em>path\to\</em><tt class="docutils literal"><span class="pre">boos
</pre>
</div>
<div class="section" id="library-naming">
<h2><a class="toc-backref" href="#id43">6.3&nbsp;&nbsp;&nbsp;Library Naming</a></h2>
<h2><a class="toc-backref" href="#id45">6.3&nbsp;&nbsp;&nbsp;Library Naming</a></h2>
<div class="note">
<p class="first admonition-title">Note</p>
<p>If, like Visual C++, your compiler supports auto-linking,
@ -737,7 +746,7 @@ version number, will also be created.</dd>
<!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -->
</div>
<div class="section" id="test-your-program">
<h2><a class="toc-backref" href="#id44">6.4&nbsp;&nbsp;&nbsp;Test Your Program</a></h2>
<h2><a class="toc-backref" href="#id46">6.4&nbsp;&nbsp;&nbsp;Test Your Program</a></h2>
<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>
<pre class="literal-block">
@ -759,7 +768,7 @@ Spoil Rock Hunter?”</p>
</div>
</div>
<div class="section" id="conclusion-and-further-resources">
<h1><a class="toc-backref" href="#id45">7&nbsp;&nbsp;&nbsp;Conclusion and Further Resources</a></h1>
<h1><a class="toc-backref" href="#id47">7&nbsp;&nbsp;&nbsp;Conclusion and Further Resources</a></h1>
<p>This concludes your introduction to Boost and to integrating it
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
@ -787,16 +796,17 @@ mailing list</a>.</p>
<table class="docutils footnote" frame="void" id="zip" rules="none">
<colgroup><col class="label" /><col /></colgroup>
<tbody valign="top">
<tr><td class="label"><a class="fn-backref" href="#id2">[1]</a></td><td>If you prefer not to download executable programs,
download <a class="reference external" href="http://sourceforge.net/project/showfiles.php?group_id=7586&amp;package_id=8041"><tt class="docutils literal"><span class="pre">boost_1_36_0</span></tt><tt class="docutils literal"><span class="pre">.zip</span></tt></a> and use an external tool to decompress
it. We don't recommend using Windows' built-in decompression as
it can be painfully slow for large archives.</td></tr>
<tr><td class="label"><a class="fn-backref" href="#id2">[1]</a></td><td>We recommend
downloading <a class="reference external" href="http://sourceforge.net/project/showfiles.php?group_id=7586&amp;package_id=8041"><tt class="docutils literal"><span class="pre">boost_1_36_0</span></tt><tt class="docutils literal"><span class="pre">.7z</span></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
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>
</tbody>
</table>
<table class="docutils footnote" frame="void" id="installer-src" rules="none">
<colgroup><col class="label" /><col /></colgroup>
<tbody valign="top">
<tr><td class="label">[2]</td><td>If you used the <a class="reference external" href="http://www.boost-consulting.com/download/windows">installer</a> from Boost
<tr><td class="label">[2]</td><td>If you used the <a class="reference external" href="http://www.boostpro.com/products/free">installer</a> from Boost
Consulting and deselected “Source and Documentation” (it's
selected by default), you won't see the <tt class="docutils literal"><span class="pre">libs/</span></tt> subdirectory.
That won't affect your ability to use precompiled binaries, but

View File

@ -35,25 +35,33 @@ __ ../../index.htm
Get Boost
=========
The easiest way to get a copy of Boost is to use the `installer`_
provided by `Boost Consulting`_. We especially recommend this
method if you use Microsoft Visual Studio .NET 2003 or Microsoft
Visual Studio 2005, because the installer can download and install
The easiest way to get a copy of Boost is to use an installer.
The `Boost website version of this Getting Started guide`_ will
have undated information on installers as they become available,
or see `Boost downloads`_ or the installer_ provided by `BoostPro Computing`_. We especially recommend using
an installer if you use Microsoft Visual Studio, because the installer can download and install
precompiled library binaries, saving you the trouble of building
them yourself. To complete this tutorial, you'll need to at least
install the Boost.Regex_ binaries when given the option.
.. _installer: http://www.boost-consulting.com/download/windows
.. _Boost Consulting: http://www.boost-consulting.com
.. _`Boost website version of this Getting Started guide`:
http://www.boost.org/doc/libs/1_36_0/more/getting_started/index.html
.. _`Boost downloads`: `sf-download`_
.. _installer: http://www.boostpro.com/products/free
.. _BoostPro Computing: http://www.boostpro.com
If you're using an earlier version of Visual Studio or some other
compiler, or if you prefer to build everything yourself, you can
download |boost.exe|_ and run it to install a complete Boost
download |boost.7z|_ or |boost_zip|_ and unpack it to install a complete Boost
distribution. [#zip]_
.. |boost.exe| replace:: |boost_ver|\ ``.exe``
.. |boost.7z| replace:: |boost_ver|\ ``.7z``
.. _`boost.exe`: `sf-download`_
.. _`boost.7z`: `sf-download`_
.. |boost_zip| replace:: |boost_ver|\ ``.zip``
.. _`boost_zip`: `sf-download`_
.. include:: detail/distro.rst
@ -175,10 +183,10 @@ To test the result, type:
.. include:: detail/binary-head.rst
Install Visual Studio (2005 or .NET 2003) Binaries
--------------------------------------------------
Install Visual Studio Binaries
------------------------------
The installer_ supplied by Boost Consulting will download and
The installers will download and
install pre-compiled binaries into the ``lib\`` subdirectory of the
boost root, typically |default-root|\ ``\lib\``. If you installed
all variants of the Boost.Regex_ binary, you're done with this
@ -210,6 +218,16 @@ For example, your session might look like this: [#continuation]_
Be sure to read `this note`__ about the appearance of ``^``,
``More?`` and quotation marks (``"``) in that line.
The above example session will build static and shared non-debug multi-threaded
variations of the libraries. To build all variations:
.. parsed-literal::
C:\\WINDOWS> cd |default-root|
|default-root|> bjam **^**
More? **--build-dir=**\ "C:\\Documents and Settings\\dave\\build-boost" **^**
More? **--toolset=**\ msvc **--build-type=complete** stage
__ continuation_
.. include:: detail/build-from-source-tail.rst
@ -291,10 +309,13 @@ Spoil Rock Hunter?”
------------------------------
.. [#zip] If you prefer not to download executable programs,
download |boost.zip|_ and use an external tool to decompress
it. We don't recommend using Windows' built-in decompression as
it can be painfully slow for large archives.
.. [#zip] We recommend
downloading |boost.7z|_ and using 7-Zip_ to decompress
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'
built-in decompression as it can be painfully slow for large archives.
.. _7-Zip: http://www.7-zip.org
.. [#installer-src] If you used the installer_ from Boost
Consulting and deselected “Source and Documentation” (it's