Update getting started.

- Document bootstrap + bjam
    - Add Boost.System to the list of compiled libraries
    - Use "stage/lib" in unix instructions consistenly


[SVN r52413]
This commit is contained in:
Vladimir Prus 2009-04-16 05:47:20 +00:00
parent 423be52fb1
commit 9504364ef5
8 changed files with 336 additions and 300 deletions

View File

@ -3,7 +3,7 @@
.. 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)
Building the special ``stage`` target places Boost Building the special ``stage`` target places Boost
library binaries in the ``stage``\ |/| subdirectory of your `build library binaries in the ``stage``\ |/|\ ``lib``\ |/| subdirectory of your `build
directory`_. directory`_.
.. Note:: ``bjam`` is case-sensitive; it is important that all the .. Note:: ``bjam`` is case-sensitive; it is important that all the

View File

@ -27,6 +27,7 @@ The only Boost libraries that *must* be built separately are:
* Boost.Regex_ * Boost.Regex_
* Boost.Serialization_ * Boost.Serialization_
* Boost.Signals_ * Boost.Signals_
* Boost.System_
* Boost.Thread_ * Boost.Thread_
* Boost.Wave_ * Boost.Wave_

View File

@ -11,6 +11,7 @@
.. _Boost.Regex: ../../libs/regex/index.html .. _Boost.Regex: ../../libs/regex/index.html
.. _Boost.Serialization: ../../libs/serialization/index.html .. _Boost.Serialization: ../../libs/serialization/index.html
.. _Boost.Signals: ../../libs/signals/index.html .. _Boost.Signals: ../../libs/signals/index.html
.. _Boost.System: ../../libs/system/index.html
.. _Boost.Test: ../../libs/test/index.html .. _Boost.Test: ../../libs/test/index.html
.. _Boost.Thread: ../../doc/html/thread.html .. _Boost.Thread: ../../doc/html/thread.html
.. _Boost.Wave: ../../libs/wave/index.html .. _Boost.Wave: ../../libs/wave/index.html

View File

@ -3,32 +3,31 @@
<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.6: http://docutils.sourceforge.net/" /> <meta name="generator" content="Docutils 0.4.1: http://docutils.sourceforge.net/" />
<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" 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-use-the-latest-version-of-this-getting-started-guide admonition">
<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/doc/libs/release/more/getting_started/index.html">Boost website version of this Getting Started guide</a> may <p class="last">The <a class="reference" href="http://www.boost.org/doc/libs/release/more/getting_started/index.html">Boost website version of this Getting Started guide</a> may
have undated information, such as the location of additional installers have undated information, such as the location of additional installers
or improved installation procedures, so you might want use that version or improved installation procedures, so you might want use that version
if you've got an Internet connection available.</p> if you've got an Internet connection available.</p>
</div> </div>
<div class="section" id="welcome"> <div class="section">
<h1>Welcome</h1> <h1><a id="welcome" name="welcome">Welcome</a></h1>
<p>Welcome to the Boost libraries! By the time you've completed this <p>Welcome to the Boost libraries! By the time you've completed this
tutorial, you'll be at least somewhat comfortable with the contents tutorial, you'll be at least somewhat comfortable with the contents
of a Boost distribution and how to go about using it.</p> of a Boost distribution and how to go about using it.</p>
</div> </div>
<div class="section" id="what-s-here"> <div class="section">
<h1>What's Here</h1> <h1><a id="what-s-here" name="what-s-here">What's Here</a></h1>
<p>This document is designed to be an <em>extremely</em> gentle introduction, <p>This document is designed to be an <em>extremely</em> gentle introduction,
so we included a fair amount of material that may already be very so we included a fair amount of material that may already be very
familiar to you. To keep things simple, we also left out some familiar to you. To keep things simple, we also left out some
@ -36,8 +35,8 @@ information intermediate and advanced users will probably want. At
the end of this document, we'll refer you on to resources that can the end of this document, we'll refer you on to resources that can
help you pursue these topics further.</p> help you pursue these topics further.</p>
</div> </div>
<div class="section" id="preliminaries"> <div class="section">
<h1>Preliminaries</h1> <h1><a id="preliminaries" name="preliminaries">Preliminaries</a></h1>
<p>We use one typographic convention that might not be immediately <p>We use one typographic convention that might not be immediately
obvious: <em>italic</em> text in examples is meant as a descriptive obvious: <em>italic</em> text in examples is meant as a descriptive
placeholder for something else, usually information that you'll placeholder for something else, usually information that you'll
@ -48,16 +47,16 @@ provide. For example:</p>
<p>Here you're expected to imagine replacing the text “your name” with <p>Here you're expected to imagine replacing the text “your name” with
your actual name.</p> your actual name.</p>
</div> </div>
<div class="section" id="ready"> <div class="section">
<h1>Ready?</h1> <h1><a id="ready" name="ready">Ready?</a></h1>
<p>Let's go!</p> <p>Let's go!</p>
</div> </div>
</div> </div>
<div class="footer"> <div class="footer">
<hr class="footer" /> <hr class="footer" />
<div class="nextpage line-block"> <div class="nextpage line-block">
<div class="line"><strong>Next:</strong> <a class="reference external" href="windows.html">Getting Started on Microsoft Windows</a></div> <div class="line"><strong>Next:</strong> <a class="reference" href="windows.html">Getting Started on Microsoft Windows</a></div>
<div class="line"><strong>or:</strong> <a class="reference external" href="unix-variants.html">Getting Started on Unix variants (e.g. Linux, MacOS)</a></div> <div class="line"><strong>or:</strong> <a class="reference" href="unix-variants.html">Getting Started on Unix variants (e.g. Linux, MacOS)</a></div>
</div> </div>
</div> </div>

View File

@ -3,15 +3,14 @@
<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.6: http://docutils.sourceforge.net/" /> <meta name="generator" content="Docutils 0.4.1: http://docutils.sourceforge.net/" />
<title>Boost Getting Started on Unix Variants</title> <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" />
<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" 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 -->
<!-- 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) -->
@ -27,43 +26,43 @@
.. _`Getting Started on Windows`: windows.html .. _`Getting Started on Windows`: windows.html
.. _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">
<p class="topic-title first">Index</p> <p class="topic-title first"><a id="index" name="index">Index</a></p>
<ul class="auto-toc simple"> <ul class="auto-toc simple">
<li><a class="reference internal" href="#get-boost" id="id21">1&nbsp;&nbsp;&nbsp;Get Boost</a></li> <li><a class="reference" href="#get-boost" id="id21" name="id21">1&nbsp;&nbsp;&nbsp;Get Boost</a></li>
<li><a class="reference internal" href="#the-boost-distribution" id="id22">2&nbsp;&nbsp;&nbsp;The Boost Distribution</a></li> <li><a class="reference" href="#the-boost-distribution" id="id22" name="id22">2&nbsp;&nbsp;&nbsp;The Boost Distribution</a></li>
<li><a class="reference internal" href="#header-only-libraries" id="id23">3&nbsp;&nbsp;&nbsp;Header-Only Libraries</a></li> <li><a class="reference" href="#header-only-libraries" id="id23" name="id23">3&nbsp;&nbsp;&nbsp;Header-Only Libraries</a></li>
<li><a class="reference internal" href="#build-a-simple-program-using-boost" id="id24">4&nbsp;&nbsp;&nbsp;Build a Simple Program Using Boost</a><ul class="auto-toc"> <li><a class="reference" href="#build-a-simple-program-using-boost" id="id24" name="id24">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="id25">4.1&nbsp;&nbsp;&nbsp;Errors and Warnings</a></li> <li><a class="reference" href="#errors-and-warnings" id="id25" name="id25">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="id26">5&nbsp;&nbsp;&nbsp;Prepare to Use a Boost Library Binary</a><ul class="auto-toc"> <li><a class="reference" href="#prepare-to-use-a-boost-library-binary" id="id26" name="id26">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="id27">5.1&nbsp;&nbsp;&nbsp;Easy Build and Install</a></li> <li><a class="reference" href="#easy-build-and-install" id="id27" name="id27">5.1&nbsp;&nbsp;&nbsp;Easy Build and Install</a></li>
<li><a class="reference internal" href="#or-build-custom-binaries" id="id28">5.2&nbsp;&nbsp;&nbsp;Or, Build Custom Binaries</a><ul class="auto-toc"> <li><a class="reference" href="#or-build-custom-binaries" id="id28" name="id28">5.2&nbsp;&nbsp;&nbsp;Or, Build Custom Binaries</a><ul class="auto-toc">
<li><a class="reference internal" href="#get-bjam" id="id29">5.2.1&nbsp;&nbsp;&nbsp;Get <tt class="docutils literal"><span class="pre">bjam</span></tt></a></li> <li><a class="reference" href="#get-bjam" id="id29" name="id29">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="id30">5.2.2&nbsp;&nbsp;&nbsp;Identify Your Toolset</a></li> <li><a class="reference" href="#identify-your-toolset" id="id30" name="id30">5.2.2&nbsp;&nbsp;&nbsp;Identify Your Toolset</a></li>
<li><a class="reference internal" href="#select-a-build-directory" id="id31">5.2.3&nbsp;&nbsp;&nbsp;Select a Build Directory</a></li> <li><a class="reference" href="#select-a-build-directory" id="id31" name="id31">5.2.3&nbsp;&nbsp;&nbsp;Select a Build Directory</a></li>
<li><a class="reference internal" href="#invoke-bjam" id="id32">5.2.4&nbsp;&nbsp;&nbsp;Invoke <tt class="docutils literal"><span class="pre">bjam</span></tt></a></li> <li><a class="reference" href="#invoke-bjam" id="id32" name="id32">5.2.4&nbsp;&nbsp;&nbsp;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="id33">5.3&nbsp;&nbsp;&nbsp;Expected Build Output</a></li> <li><a class="reference" href="#expected-build-output" id="id33" name="id33">5.3&nbsp;&nbsp;&nbsp;Expected Build Output</a></li>
<li><a class="reference internal" href="#in-case-of-build-errors" id="id34">5.4&nbsp;&nbsp;&nbsp;In Case of Build Errors</a></li> <li><a class="reference" href="#in-case-of-build-errors" id="id34" name="id34">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="id35">6&nbsp;&nbsp;&nbsp;Link Your Program to a Boost Library</a><ul class="auto-toc"> <li><a class="reference" href="#link-your-program-to-a-boost-library" id="id35" name="id35">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="id36">6.1&nbsp;&nbsp;&nbsp;Library Naming</a></li> <li><a class="reference" href="#library-naming" id="id36" name="id36">6.1&nbsp;&nbsp;&nbsp;Library Naming</a></li>
<li><a class="reference internal" href="#test-your-program" id="id37">6.2&nbsp;&nbsp;&nbsp;Test Your Program</a></li> <li><a class="reference" href="#test-your-program" id="id37" name="id37">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="id38">7&nbsp;&nbsp;&nbsp;Conclusion and Further Resources</a></li> <li><a class="reference" href="#conclusion-and-further-resources" id="id38" name="id38">7&nbsp;&nbsp;&nbsp;Conclusion and Further Resources</a></li>
</ul> </ul>
</div> </div>
<div class="section" id="get-boost"> <div class="section">
<h1><a class="toc-backref" href="#id21">1&nbsp;&nbsp;&nbsp;Get Boost</a></h1> <h1><a class="toc-backref" href="#id21" id="get-boost" name="get-boost">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://sourceforge.net/project/showfiles.php?group_id=7586&amp;package_id=8041">SourceForge</a>:</p> distribution from <a class="reference" href="http://sourceforge.net/project/showfiles.php?group_id=7586&amp;package_id=8041">SourceForge</a>:</p>
<ol class="arabic"> <ol class="arabic">
<li><p class="first">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_39_0</span></tt><tt class="docutils literal"><span class="pre">.tar.bz2</span></tt></a>.</p> <li><p class="first">Download <a class="reference" href="http://sourceforge.net/project/showfiles.php?group_id=7586&amp;package_id=8041"><tt class="docutils literal"><span class="pre">boost_1_39_0</span></tt><tt class="docutils literal"><span class="pre">.tar.bz2</span></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>
@ -79,16 +78,16 @@ 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="id2" name="id2"><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://sourceforge.net/project/showfiles.php?group_id=7586&amp;package_id=8041">SourceForge</a>.</p> from <a class="reference" href="http://sourceforge.net/project/showfiles.php?group_id=7586&amp;package_id=8041">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">
<h1><a class="toc-backref" href="#id22">2&nbsp;&nbsp;&nbsp;The Boost Distribution</a></h1> <h1><a class="toc-backref" href="#id22" id="the-boost-distribution" name="the-boost-distribution">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_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>
@ -123,7 +122,7 @@ the Python library's <tt class="docutils literal"><span class="pre">def.hpp</spa
</li> </li>
<li><p class="first">Some libraries have an “aggregate header” in <tt class="docutils literal"><span class="pre">boost</span></tt><tt class="docutils literal"><span class="pre">/</span></tt> that <li><p class="first">Some libraries have an “aggregate header” in <tt class="docutils literal"><span class="pre">boost</span></tt><tt class="docutils literal"><span class="pre">/</span></tt> that
<tt class="docutils literal"><span class="pre">#include</span></tt>s all of the library's other headers. For <tt class="docutils literal"><span class="pre">#include</span></tt>s all of the library's other headers. For
example, <a class="reference external" href="../../libs/python/doc/building.html">Boost.Python</a>'s aggregate header is</p> example, <a class="reference" href="../../libs/python/doc/building.html">Boost.Python</a>'s aggregate header is</p>
<pre class="literal-block"> <pre class="literal-block">
<tt class="docutils literal"><span class="pre">boost</span></tt><tt class="docutils literal"><span class="pre">/</span></tt><tt class="docutils literal"><span class="pre">python.hpp</span></tt>. <tt class="docutils literal"><span class="pre">boost</span></tt><tt class="docutils literal"><span class="pre">/</span></tt><tt class="docutils literal"><span class="pre">python.hpp</span></tt>.
</pre> </pre>
@ -165,8 +164,8 @@ contains a subset of the Boost documentation. Start with
<!-- 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="header-only-libraries"> <div class="section">
<h1><a class="toc-backref" href="#id23">3&nbsp;&nbsp;&nbsp;Header-Only Libraries</a></h1> <h1><a class="toc-backref" href="#id23" id="header-only-libraries" name="header-only-libraries">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-nothing-to-build admonition">
@ -179,25 +178,26 @@ treatment when linking.</p>
<!-- .. _separate: --> <!-- .. _separate: -->
<p>The only Boost libraries that <em>must</em> be built separately are:</p> <p>The only Boost libraries that <em>must</em> be built separately are:</p>
<ul class="simple"> <ul class="simple">
<li><a class="reference external" href="../../libs/filesystem/index.html">Boost.Filesystem</a></li> <li><a class="reference" href="../../libs/filesystem/index.html">Boost.Filesystem</a></li>
<li><a class="reference external" href="../../libs/iostreams/index.html">Boost.IOStreams</a></li> <li><a class="reference" href="../../libs/iostreams/index.html">Boost.IOStreams</a></li>
<li><a class="reference external" href="../../libs/program_options/index.html">Boost.ProgramOptions</a></li> <li><a class="reference" href="../../libs/program_options/index.html">Boost.ProgramOptions</a></li>
<li><a class="reference external" href="../../libs/python/doc/building.html">Boost.Python</a> (see the <a class="reference external" href="../../libs/python/doc/building.html">Boost.Python build documentation</a> <li><a class="reference" href="../../libs/python/doc/building.html">Boost.Python</a> (see the <a class="reference" href="../../libs/python/doc/building.html">Boost.Python build documentation</a>
before building and installing it)</li> before building and installing it)</li>
<li><a class="reference external" href="../../libs/regex/index.html">Boost.Regex</a></li> <li><a class="reference" href="../../libs/regex/index.html">Boost.Regex</a></li>
<li><a class="reference external" href="../../libs/serialization/index.html">Boost.Serialization</a></li> <li><a class="reference" href="../../libs/serialization/index.html">Boost.Serialization</a></li>
<li><a class="reference external" href="../../libs/signals/index.html">Boost.Signals</a></li> <li><a class="reference" href="../../libs/signals/index.html">Boost.Signals</a></li>
<li><a class="reference external" href="../../doc/html/thread.html">Boost.Thread</a></li> <li><a class="reference" href="../../libs/system/index.html">Boost.System</a></li>
<li><a class="reference external" href="../../libs/wave/index.html">Boost.Wave</a></li> <li><a class="reference" href="../../doc/html/thread.html">Boost.Thread</a></li>
<li><a class="reference" href="../../libs/wave/index.html">Boost.Wave</a></li>
</ul> </ul>
<p>A few libraries have optional separately-compiled binaries:</p> <p>A few libraries have optional separately-compiled binaries:</p>
<ul class="simple"> <ul class="simple">
<li><a class="reference external" href="../../libs/date_time/index.html">Boost.DateTime</a> has a binary component that is only needed if <li><a class="reference" href="../../libs/date_time/index.html">Boost.DateTime</a> has a binary component that is only needed if
you're using its <tt class="docutils literal"><span class="pre">to_string</span></tt>/<tt class="docutils literal"><span class="pre">from_string</span></tt> or serialization you're using its <tt class="docutils literal"><span class="pre">to_string</span></tt>/<tt class="docutils literal"><span class="pre">from_string</span></tt> or serialization
features, or if you're targeting Visual C++ 6.x or Borland.</li> features, or if you're targeting Visual C++ 6.x or Borland.</li>
<li><a class="reference external" href="../../libs/graph/index.html">Boost.Graph</a> also has a binary component that is only needed if <li><a class="reference" href="../../libs/graph/index.html">Boost.Graph</a> also has a binary component that is only needed if
you intend to <a class="reference external" href="../../libs/graph/doc/read_graphviz.html">parse GraphViz files</a>.</li> you intend to <a class="reference" href="../../libs/graph/doc/read_graphviz.html">parse GraphViz files</a>.</li>
<li><a class="reference external" href="../../libs/test/index.html">Boost.Test</a> can be used in “header-only” or “separately compiled” <li><a class="reference" href="../../libs/test/index.html">Boost.Test</a> can be used in “header-only” or “separately compiled”
mode, although <strong>separate compilation is recommended for serious mode, although <strong>separate compilation is recommended for serious
use</strong>.</li> use</strong>.</li>
</ul> </ul>
@ -205,8 +205,8 @@ use</strong>.</li>
<!-- 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="build-a-simple-program-using-boost"> <div class="section">
<h1><a class="toc-backref" href="#id24">4&nbsp;&nbsp;&nbsp;Build a Simple Program Using Boost</a></h1> <h1><a class="toc-backref" href="#id24" id="build-a-simple-program-using-boost" name="build-a-simple-program-using-boost">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
@ -239,85 +239,85 @@ echo 1 2 3 | ./example
<!-- 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="errors-and-warnings"> <div class="section">
<h2><a class="toc-backref" href="#id25">4.1&nbsp;&nbsp;&nbsp;Errors and Warnings</a></h2> <h2><a class="toc-backref" href="#id25" id="errors-and-warnings" name="errors-and-warnings">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="id5"><sup>3</sup></a> <strong>Errors are another matter</strong>. If you're practical.<a class="footnote-reference" href="#warnings" id="id5" name="id5"><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" 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" href="#boost-root-directory">Boost root directory</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="prepare-to-use-a-boost-library-binary"> <div class="section">
<h1><a class="toc-backref" href="#id26">5&nbsp;&nbsp;&nbsp;Prepare to Use a Boost Library Binary</a></h1> <h1><a class="toc-backref" href="#id26" id="prepare-to-use-a-boost-library-binary" name="prepare-to-use-a-boost-library-binary">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">
<h2><a class="toc-backref" href="#id27">5.1&nbsp;&nbsp;&nbsp;Easy Build and Install</a></h2> <h2><a class="toc-backref" href="#id27" id="easy-build-and-install" name="easy-build-and-install">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"><span class="pre">$</span></tt>; that <p>Issue the following commands in the shell (don't type <tt class="docutils literal"><span class="pre">$</span></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"><span class="pre">boost_1_39_0</span></tt> <strong>$</strong> cd <em>path/to/</em><tt class="docutils literal"><span class="pre">boost_1_39_0</span></tt>
<strong>$</strong> ./configure --help <strong>$</strong> ./bootstrap.sh --help
</pre> </pre>
<p>Select your configuration options and invoke <tt class="docutils literal"><span class="pre">./configure</span></tt> again <p>Select your configuration options and invoke <tt class="docutils literal"><span class="pre">./bootstrap.sh</span></tt> again
without the <tt class="docutils literal"><span class="pre">--help</span></tt> option. Unless you have write permission in without the <tt class="docutils literal"><span class="pre">--help</span></tt> option. Unless you have write permission in
your system's <tt class="docutils literal"><span class="pre">/usr/local/</span></tt> directory, you'll probably want to at your system's <tt class="docutils literal"><span class="pre">/usr/local/</span></tt> directory, you'll probably want to at
least use</p> least use</p>
<pre class="literal-block"> <pre class="literal-block">
<strong>$</strong> ./configure <strong>--prefix=</strong><em>path</em>/<em>to</em>/<em>installation</em>/<em>prefix</em> <strong>$</strong> ./bootstrap.sh <strong>--prefix=</strong><em>path</em>/<em>to</em>/<em>installation</em>/<em>prefix</em>
</pre> </pre>
<p>to install somewhere else. Also, consider using the <p>to install somewhere else. Also, consider using the
<tt class="docutils literal"><span class="pre">--show-libraries</span></tt> and <tt class="docutils literal"><span class="pre">--with-libraries=</span></tt> options to limit the <tt class="docutils literal"><span class="pre">--show-libraries</span></tt> and <tt class="docutils literal"><span class="pre">--with-libraries=</span></tt> options to limit the
long wait you'll experience if you build everything. Finally,</p> long wait you'll experience if you build everything. Finally,</p>
<pre class="literal-block"> <pre class="literal-block">
<strong>$</strong> make install <strong>$</strong> ./bjam install
</pre> </pre>
<p>will leave Boost binaries in the <tt class="docutils literal"><span class="pre">lib/</span></tt> subdirectory of your <p>will leave Boost binaries in the <tt class="docutils literal"><span class="pre">lib/</span></tt> subdirectory of your
installation prefix. You will also find a copy of the Boost installation prefix. You will also find a copy of the Boost
headers in the <tt class="docutils literal"><span class="pre">include/</span></tt> subdirectory of the installation headers in the <tt class="docutils literal"><span class="pre">include/</span></tt> subdirectory of the installation
prefix, so you can henceforth use that directory as an <tt class="docutils literal"><span class="pre">#include</span></tt> prefix, so you can henceforth use that directory as an <tt class="docutils literal"><span class="pre">#include</span></tt>
path in place of the Boost root directory.</p> 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" 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">
<h2><a class="toc-backref" href="#id28">5.2&nbsp;&nbsp;&nbsp;Or, Build Custom Binaries</a></h2> <h2><a class="toc-backref" href="#id28" id="or-build-custom-binaries" name="or-build-custom-binaries">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. You'll also need to use <a class="reference" href="../../tools/build/index.html">Boost.Build</a> to create binaries. 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" href="../../tools/build/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) -->
<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" href="../../tools/build/index.html">Boost.Build</a> is a text-based system for developing, testing, and
installing software. To use it, you'll need an executable called 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">
<h3><a class="toc-backref" href="#id29">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="#id29" id="get-bjam" name="get-bjam">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 command-line tool that drives the Boost Build <p><tt class="docutils literal"><span class="pre">bjam</span></tt> is the command-line tool 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>
<p>We suggest you <a class="reference external" href="http://sourceforge.net/project/showfiles.php?group_id=7586&amp;package_id=72941">download a pre-built <tt class="docutils literal"><span class="pre">bjam</span></tt> executable</a> for your platform. <p>We suggest you <a class="reference" href="http://sourceforge.net/project/showfiles.php?group_id=7586&amp;package_id=72941">download a pre-built <tt class="docutils literal"><span class="pre">bjam</span></tt> executable</a> for your platform.
Alternatively, you can build <tt class="docutils literal"><span class="pre">bjam</span></tt> yourself using <a class="reference external" href="../../doc/html/jam/building.html">these Alternatively, you can build <tt class="docutils literal"><span class="pre">bjam</span></tt> yourself using <a class="reference" href="../../doc/html/jam/building.html">these
instructions</a>.</p> instructions</a>.</p>
<p>Move the <tt class="docutils literal"><span class="pre">bjam</span></tt> executable into a directory in your PATH. You can <p>Move the <tt class="docutils literal"><span class="pre">bjam</span></tt> executable into a directory in your PATH. You can
see the list of directories in your PATH, separated by colons, see the list of directories in your PATH, separated by colons,
by typing “<tt class="docutils literal"><span class="pre">echo</span> <span class="pre">$PATH</span></tt>” at the command prompt.</p> by typing “<tt class="docutils literal"><span class="pre">echo</span> <span class="pre">$PATH</span></tt>” at the command prompt.</p>
</div> </div>
<div class="section" id="identify-your-toolset"> <div class="section">
<span id="toolset-name"></span><span id="toolset"></span><h3><a class="toc-backref" href="#id30">5.2.2&nbsp;&nbsp;&nbsp;Identify Your Toolset</a></h3> <h3><a class="toc-backref" href="#id30" id="identify-your-toolset" name="identify-your-toolset"><span id="toolset-name"></span><span id="toolset"></span>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/boost-build2/doc/html/bbv2/reference/tools.html">in the following table (an up-to-date list is always available <a class="reference" href="http://www.boost.org/boost-build2/doc/html/bbv2/reference/tools.html">in the
Boost.Build documentation</a>).</p> 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
<a class="reference external" href="../../doc/html/jam/building.html">building bjam</a>, you should assume it won't work and instead <a class="reference" href="../../doc/html/jam/building.html">building bjam</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">
@ -346,7 +346,7 @@ known to work well with Boost</td>
<tr><td><tt class="docutils literal"><span class="pre">como</span></tt></td> <tr><td><tt class="docutils literal"><span class="pre">como</span></tt></td>
<td>Comeau Computing</td> <td>Comeau Computing</td>
<td>Using this toolset may <td>Using this toolset may
require <a class="reference external" href="../../tools/build/index.html">configuring</a> another require <a class="reference" href="../../tools/build/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"><span class="pre">cw</span></tt></td> <tr><td><tt class="docutils literal"><span class="pre">cw</span></tt></td>
@ -408,34 +408,34 @@ 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>. <tt class="docutils literal"> </tt></p>
</div> </div>
<div class="section" id="select-a-build-directory"> <div class="section">
<span id="id11"></span><span id="build-directory"></span><h3><a class="toc-backref" href="#id31">5.2.3&nbsp;&nbsp;&nbsp;Select a Build Directory</a></h3> <h3><a class="toc-backref" href="#id31" id="select-a-build-directory" name="select-a-build-directory"><span id="id11"></span><span id="build-directory"></span>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" 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
default Boost.Build will create a <tt class="docutils literal"><span class="pre">bin.v2/</span></tt> subdirectory for that default Boost.Build will create a <tt class="docutils literal"><span class="pre">bin.v2/</span></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-bjam"> <div class="section">
<h3><a class="toc-backref" href="#id32">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="#id32" id="invoke-bjam" name="invoke-bjam">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 <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="#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 bjam <strong>--build-dir=</strong><a class="reference" href="#id11"><em>build-directory</em></a> <strong>toolset=</strong><a class="reference" href="#toolset-name"><em>toolset-name</em></a> <tt class="docutils literal"> </tt> 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/boost-build2/doc/html/bbv2/advanced/invocation.html">Boost.Build documentation</a>.</p> please see the <a class="reference" 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:</p> <p>For example, your session might look like this:</p>
<pre class="literal-block"> <pre class="literal-block">
$ cd ~/<tt class="docutils literal"><span class="pre">boost_1_39_0</span></tt> $ cd ~/<tt class="docutils literal"><span class="pre">boost_1_39_0</span></tt>
$ bjam <strong>--build-dir=</strong>/tmp/build-boost <strong>toolset=</strong>gcc stage $ bjam <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, “``--build-type=complete``”.</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) -->
<p>Building the special <tt class="docutils literal"><span class="pre">stage</span></tt> target places Boost <p>Building the special <tt class="docutils literal"><span class="pre">stage</span></tt> target places Boost
library binaries in the <tt class="docutils literal"><span class="pre">stage</span></tt><tt class="docutils literal"><span class="pre">/</span></tt> subdirectory of your <a class="reference internal" href="#build-directory">build library binaries in the <tt class="docutils literal"><span class="pre">stage</span></tt><tt class="docutils literal"><span class="pre">/</span></tt><tt class="docutils literal"><span class="pre">lib</span></tt><tt class="docutils literal"><span class="pre">/</span></tt> subdirectory of your <a class="reference" href="#build-directory">build
directory</a>.</p> directory</a>.</p>
<div class="note"> <div class="note">
<p class="first admonition-title">Note</p> <p class="first admonition-title">Note</p>
@ -460,12 +460,12 @@ be interested in:</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
everything is went well, you might redirect the output into a everything is went well, you might redirect the output into a
file by appending “<tt class="docutils literal"><span class="pre">&gt;build.log</span> <span class="pre">2&gt;&amp;1</span></tt>” to your command line.</p> file by appending “``&gt;build.log 2&gt;&amp;1``” to your command line.</p>
</div> </div>
</div> </div>
</div> </div>
<div class="section" id="expected-build-output"> <div class="section">
<h2><a class="toc-backref" href="#id33">5.3&nbsp;&nbsp;&nbsp;Expected Build Output</a></h2> <h2><a class="toc-backref" href="#id33" id="expected-build-output" name="expected-build-output">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>
@ -488,28 +488,28 @@ look something like:</p>
</li> </li>
</ul> </ul>
</div> </div>
<div class="section" id="in-case-of-build-errors"> <div class="section">
<h2><a class="toc-backref" href="#id34">5.4&nbsp;&nbsp;&nbsp;In Case of Build Errors</a></h2> <h2><a class="toc-backref" href="#id34" id="in-case-of-build-errors" name="in-case-of-build-errors">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" href="../../libs/iostreams/doc/installation.html">here</a>. Install the relevant development
packages for libz and libbz2 if you need those features. Other 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/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 <a class="reference" 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 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" href="http://www.boost.org/more/mailing_lists.htm#jamboost">Boost.Build 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">
<h1><a class="toc-backref" href="#id35">6&nbsp;&nbsp;&nbsp;Link Your Program to a Boost Library</a></h1> <h1><a class="toc-backref" href="#id35" id="link-your-program-to-a-boost-library" name="link-your-program-to-a-boost-library">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" href="../../libs/regex/index.html">Boost.Regex</a> library, which has a
separately-compiled binary component.</p> separately-compiled binary component.</p>
<pre class="literal-block"> <pre class="literal-block">
#include &lt;boost/regex.hpp&gt; #include &lt;boost/regex.hpp&gt;
@ -543,14 +543,14 @@ project.</li>
<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"><span class="pre">boost_1_39_0</span></tt> example.cpp -o example <strong>\</strong> $ c++ -I <em>path/to/</em><tt class="docutils literal"><span class="pre">boost_1_39_0</span></tt> example.cpp -o example <strong>\</strong>
<strong>~/boost/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"><span class="pre">lib</span></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="id15" name="id15"><sup>2</sup></a> dropping the filename's leading <tt class="docutils literal"><span class="pre">lib</span></tt> and trailing
suffix (<tt class="docutils literal"><span class="pre">.a</span></tt> in this case):</p> suffix (<tt class="docutils literal"><span class="pre">.a</span></tt> in this case):</p>
<pre class="literal-block"> <pre class="literal-block">
$ c++ -I <em>path/to/</em><tt class="docutils literal"><span class="pre">boost_1_39_0</span></tt> example.cpp -o example <strong>\</strong> $ c++ -I <em>path/to/</em><tt class="docutils literal"><span class="pre">boost_1_39_0</span></tt> example.cpp -o example <strong>\</strong>
<strong>-L~/boost/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
library; it <em>really</em> pays off when you're using multiple library; it <em>really</em> pays off when you're using multiple
@ -561,10 +561,10 @@ automatically for you unless you pass a special option such as
<tt class="docutils literal"><span class="pre">-static</span></tt> on the command line.</p> <tt class="docutils literal"><span class="pre">-static</span></tt> on the command line.</p>
</li> </li>
</ol> </ol>
<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" 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">
<h2><a class="toc-backref" href="#id36">6.1&nbsp;&nbsp;&nbsp;Library Naming</a></h2> <h2><a class="toc-backref" href="#id36" id="library-naming" name="library-naming">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) -->
@ -579,11 +579,11 @@ 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="id17"><sup>4</sup></a></dd> not.<a class="footnote-reference" href="#distinct" id="id17" name="id17"><sup>4</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>
<dd><em>Toolset tag</em>: identifies the <a class="reference internal" href="#toolset">toolset</a> and version used to build <dd><em>Toolset tag</em>: identifies the <a class="reference" href="#toolset">toolset</a> and version used to build
the binary.</dd> the binary.</dd>
<dt><tt class="docutils literal"><span class="pre">-mt</span></tt></dt> <dt><tt class="docutils literal"><span class="pre">-mt</span></tt></dt>
<dd><em>Threading tag</em>: indicates that the library was <dd><em>Threading tag</em>: indicates that the library was
@ -614,17 +614,17 @@ libraries.</td>
<td>using debug versions of the standard and runtime support libraries.</td> <td>using debug versions of the standard and runtime support libraries.</td>
</tr> </tr>
<tr><td><tt class="docutils literal"><span class="pre">y</span></tt></td> <tr><td><tt class="docutils literal"><span class="pre">y</span></tt></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" 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="id18"><sup>5</sup></a></td> <td>building a debug version of your code.<a class="footnote-reference" href="#debug-abi" id="id18" name="id18"><sup>5</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="id19"><sup>6</sup></a></td> <td>using STLPort's deprecated “native iostreams” feature.<a class="footnote-reference" href="#native" id="id19" name="id19"><sup>6</sup></a></td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
@ -655,8 +655,8 @@ version number, will also be created.</dd>
<!-- 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="test-your-program"> <div class="section">
<h2><a class="toc-backref" href="#id37">6.2&nbsp;&nbsp;&nbsp;Test Your Program</a></h2> <h2><a class="toc-backref" href="#id37" id="test-your-program" name="test-your-program">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"><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">
@ -695,23 +695,23 @@ Spoil Rock Hunter?”</p>
<!-- 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="conclusion-and-further-resources"> <div class="section">
<h1><a class="toc-backref" href="#id38">7&nbsp;&nbsp;&nbsp;Conclusion and Further Resources</a></h1> <h1><a class="toc-backref" href="#id38" id="conclusion-and-further-resources" name="conclusion-and-further-resources">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
we may have a “Book 2 in the Getting Started series” that addresses we may have a “Book 2 in the Getting Started series” that addresses
them. Until then, we suggest you pursue the following resources. them. Until then, we suggest you pursue the following resources.
If you can't find what you need, or there's anything we can do to 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" 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/v2/index.html">Boost.Build reference manual</a></li> <li><a class="reference" href="../../tools/build/v2/index.html">Boost.Build reference manual</a></li>
<li><a class="reference external" href="../../tools/jam/index.html">Boost.Jam reference manual</a></li> <li><a class="reference" href="../../tools/jam/index.html">Boost.Jam 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" 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" href="http://www.boost.org/more/mailing_lists.htm#jamboost">Boost.Build mailing list</a></li>
<li><a class="reference external" href="http://www.crystalclearsoftware.com/cgi-bin/boost_wiki/wiki.pl?Boost.Build_V2">Boost.Build Wiki</a></li> <li><a class="reference" href="http://www.crystalclearsoftware.com/cgi-bin/boost_wiki/wiki.pl?Boost.Build_V2">Boost.Build Wiki</a></li>
<li><a class="reference external" href="../../libs/index.html">Index of all Boost library documentation</a></li> <li><a class="reference" href="../../libs/index.html">Index of all Boost library documentation</a></li>
</ul> </ul>
<div class="admonition-onward admonition"> <div class="admonition-onward admonition">
<p class="first admonition-title">Onward</p> <p class="first admonition-title">Onward</p>
@ -724,16 +724,17 @@ 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="#id2" name="packagers">[1]</a></td><td><p class="first">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" href="http://www.boost.org/more/mailing_lists.htm#main">Boost developers' list</a>.</p>
</td></tr>
</tbody> </tbody>
</table> </table>
<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="#id15" name="lowercase-l">[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>
@ -743,7 +744,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="#id5">[3]</a></td><td>Remember that warnings are specific to each compiler <tr><td class="label"><a class="fn-backref" href="#id5" name="warnings">[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
@ -754,7 +755,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="#id17" name="distinct">[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>
@ -763,7 +764,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="#id18" name="debug-abi">[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"><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
@ -773,7 +774,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="#id19">[6]</a></td><td>This feature of STLPort is deprecated because it's <tr><td class="label"><a class="fn-backref" href="#id19" name="native">[6]</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>

View File

@ -96,16 +96,16 @@ represents the shell's prompt):
.. parsed-literal:: .. parsed-literal::
**$** cd |root| **$** cd |root|
**$** ./configure --help **$** ./bootstrap.sh --help
Select your configuration options and invoke ``./configure`` again Select your configuration options and invoke ``./bootstrap.sh`` again
without the ``--help`` option. Unless you have write permission in without the ``--help`` option. Unless you have write permission in
your system's ``/usr/local/`` directory, you'll probably want to at your system's ``/usr/local/`` directory, you'll probably want to at
least use least use
.. parsed-literal:: .. parsed-literal::
**$** ./configure **--prefix=**\ *path*\ /\ *to*\ /\ *installation*\ /\ *prefix* **$** ./bootstrap.sh **--prefix=**\ *path*\ /\ *to*\ /\ *installation*\ /\ *prefix*
to install somewhere else. Also, consider using the to install somewhere else. Also, consider using the
``--show-libraries`` and ``--with-libraries=`` options to limit the ``--show-libraries`` and ``--with-libraries=`` options to limit the
@ -113,7 +113,7 @@ long wait you'll experience if you build everything. Finally,
.. parsed-literal:: .. parsed-literal::
**$** make install **$** ./bjam install
will leave Boost binaries in the ``lib/`` subdirectory of your will leave Boost binaries in the ``lib/`` subdirectory of your
installation prefix. You will also find a copy of the Boost installation prefix. You will also find a copy of the Boost
@ -155,7 +155,7 @@ A. You can specify the full path to each library:
.. parsed-literal:: .. parsed-literal::
$ c++ -I |root| example.cpp -o example **\\** $ c++ -I |root| example.cpp -o example **\\**
**~/boost/lib/libboost_regex-gcc34-mt-d-1_36.a** **~/boost/stage/lib/libboost_regex-gcc34-mt-d-1_36.a**
B. You can separately specify a directory to search (with ``-L``\ B. You can separately specify a directory to search (with ``-L``\
*directory*) and a library name to search for (with ``-l``\ *directory*) and a library name to search for (with ``-l``\
@ -165,7 +165,7 @@ B. You can separately specify a directory to search (with ``-L``\
.. parsed-literal:: .. parsed-literal::
$ c++ -I |root| example.cpp -o example **\\** $ c++ -I |root| example.cpp -o example **\\**
**-L~/boost/lib/ -lboost_regex-gcc34-mt-d-1_36** **-L~/boost/stage/lib/ -lboost_regex-gcc34-mt-d-1_36**
As you can see, this method is just as terse as method A for one As you can see, this method is just as terse as method A for one
library; it *really* pays off when you're using multiple library; it *really* pays off when you're using multiple

View File

@ -3,83 +3,83 @@
<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.6: http://docutils.sourceforge.net/" /> <meta name="generator" content="Docutils 0.4.1: http://docutils.sourceforge.net/" />
<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" 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-a-note-to-cygwin-and-mingw-users admonition">
<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" href="http://www.cygwin.com">Cygwin</a> and <a class="reference" 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" href="http://www.cygwin.com">Cygwin</a>
bash shell, you're actually running on a POSIX platform and bash shell, you're actually running on a POSIX platform and
should follow the instructions for <a class="reference external" href="unix-variants.html">getting started on Unix should follow the instructions for <a class="reference" href="unix-variants.html">getting started on Unix
variants</a>. Other command shells, such as <a class="reference external" href="http://mingw.org">MinGW</a>'s MSYS, are variants</a>. Other command shells, such as <a class="reference" href="http://mingw.org">MinGW</a>'s MSYS, are
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">
<p class="topic-title first">Index</p> <p class="topic-title first"><a id="index" name="index">Index</a></p>
<ul class="auto-toc simple"> <ul class="auto-toc simple">
<li><a class="reference internal" href="#get-boost" id="id29">1&nbsp;&nbsp;&nbsp;Get Boost</a></li> <li><a class="reference" href="#get-boost" id="id30" name="id30">1&nbsp;&nbsp;&nbsp;Get Boost</a></li>
<li><a class="reference internal" href="#the-boost-distribution" id="id30">2&nbsp;&nbsp;&nbsp;The Boost Distribution</a></li> <li><a class="reference" href="#the-boost-distribution" id="id31" name="id31">2&nbsp;&nbsp;&nbsp;The Boost Distribution</a></li>
<li><a class="reference internal" href="#header-only-libraries" id="id31">3&nbsp;&nbsp;&nbsp;Header-Only Libraries</a></li> <li><a class="reference" href="#header-only-libraries" id="id32" name="id32">3&nbsp;&nbsp;&nbsp;Header-Only Libraries</a></li>
<li><a class="reference internal" href="#build-a-simple-program-using-boost" id="id32">4&nbsp;&nbsp;&nbsp;Build a Simple Program Using Boost</a><ul class="auto-toc"> <li><a class="reference" href="#build-a-simple-program-using-boost" id="id33" name="id33">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="id33">4.1&nbsp;&nbsp;&nbsp;Build From the Visual Studio IDE</a></li> <li><a class="reference" href="#build-from-the-visual-studio-ide" id="id34" name="id34">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="id34">4.2&nbsp;&nbsp;&nbsp;Or, Build From the Command Prompt</a></li> <li><a class="reference" href="#or-build-from-the-command-prompt" id="id35" name="id35">4.2&nbsp;&nbsp;&nbsp;Or, Build From the Command Prompt</a></li>
<li><a class="reference internal" href="#errors-and-warnings" id="id35">4.3&nbsp;&nbsp;&nbsp;Errors and Warnings</a></li> <li><a class="reference" href="#errors-and-warnings" id="id36" name="id36">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="id36">5&nbsp;&nbsp;&nbsp;Prepare to Use a Boost Library Binary</a><ul class="auto-toc"> <li><a class="reference" href="#prepare-to-use-a-boost-library-binary" id="id37" name="id37">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="id37">5.1&nbsp;&nbsp;&nbsp;Install Visual Studio Binaries</a></li> <li><a class="reference" href="#install-visual-studio-binaries" id="id38" name="id38">5.1&nbsp;&nbsp;&nbsp;Install Visual Studio Binaries</a></li>
<li><a class="reference internal" href="#or-build-binaries-from-source" id="id38">5.2&nbsp;&nbsp;&nbsp;Or, Build Binaries From Source</a><ul class="auto-toc"> <li><a class="reference" href="#or-simplified-build-from-source" id="id39" name="id39">5.2&nbsp;&nbsp;&nbsp;Or, Simplified Build From Source</a></li>
<li><a class="reference internal" href="#get-bjam" id="id39">5.2.1&nbsp;&nbsp;&nbsp;Get <tt class="docutils literal"><span class="pre">bjam</span></tt></a></li> <li><a class="reference" href="#or-build-binaries-from-source" id="id40" name="id40">5.3&nbsp;&nbsp;&nbsp;Or, Build Binaries From Source</a><ul class="auto-toc">
<li><a class="reference internal" href="#identify-your-toolset" id="id40">5.2.2&nbsp;&nbsp;&nbsp;Identify Your Toolset</a></li> <li><a class="reference" href="#get-bjam" id="id41" name="id41">5.3.1&nbsp;&nbsp;&nbsp;Get <tt class="docutils literal"><span class="pre">bjam</span></tt></a></li>
<li><a class="reference internal" href="#select-a-build-directory" id="id41">5.2.3&nbsp;&nbsp;&nbsp;Select a Build Directory</a></li> <li><a class="reference" href="#identify-your-toolset" id="id42" name="id42">5.3.2&nbsp;&nbsp;&nbsp;Identify Your Toolset</a></li>
<li><a class="reference internal" href="#invoke-bjam" id="id42">5.2.4&nbsp;&nbsp;&nbsp;Invoke <tt class="docutils literal"><span class="pre">bjam</span></tt></a></li> <li><a class="reference" href="#select-a-build-directory" id="id43" name="id43">5.3.3&nbsp;&nbsp;&nbsp;Select a Build Directory</a></li>
<li><a class="reference" href="#invoke-bjam" id="id44" name="id44">5.3.4&nbsp;&nbsp;&nbsp;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="id43">5.3&nbsp;&nbsp;&nbsp;Expected Build Output</a></li> <li><a class="reference" href="#expected-build-output" id="id45" name="id45">5.4&nbsp;&nbsp;&nbsp;Expected Build Output</a></li>
<li><a class="reference internal" href="#in-case-of-build-errors" id="id44">5.4&nbsp;&nbsp;&nbsp;In Case of Build Errors</a></li> <li><a class="reference" href="#in-case-of-build-errors" id="id46" name="id46">5.5&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="id45">6&nbsp;&nbsp;&nbsp;Link Your Program to a Boost Library</a><ul class="auto-toc"> <li><a class="reference" href="#link-your-program-to-a-boost-library" id="id47" name="id47">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="id46">6.1&nbsp;&nbsp;&nbsp;Link From Within the Visual Studio IDE</a></li> <li><a class="reference" href="#link-from-within-the-visual-studio-ide" id="id48" name="id48">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="id47">6.2&nbsp;&nbsp;&nbsp;Or, Link From the Command Prompt</a></li> <li><a class="reference" href="#or-link-from-the-command-prompt" id="id49" name="id49">6.2&nbsp;&nbsp;&nbsp;Or, Link From the Command Prompt</a></li>
<li><a class="reference internal" href="#library-naming" id="id48">6.3&nbsp;&nbsp;&nbsp;Library Naming</a></li> <li><a class="reference" href="#library-naming" id="id50" name="id50">6.3&nbsp;&nbsp;&nbsp;Library Naming</a></li>
<li><a class="reference internal" href="#test-your-program" id="id49">6.4&nbsp;&nbsp;&nbsp;Test Your Program</a></li> <li><a class="reference" href="#test-your-program" id="id51" name="id51">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="id50">7&nbsp;&nbsp;&nbsp;Conclusion and Further Resources</a></li> <li><a class="reference" href="#conclusion-and-further-resources" id="id52" name="id52">7&nbsp;&nbsp;&nbsp;Conclusion and Further Resources</a></li>
</ul> </ul>
</div> </div>
<div class="section" id="get-boost"> <div class="section">
<h1><a class="toc-backref" href="#id29">1&nbsp;&nbsp;&nbsp;Get Boost</a></h1> <h1><a class="toc-backref" href="#id30" id="get-boost" name="get-boost">1&nbsp;&nbsp;&nbsp;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" 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
<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 <a class="reference" href="http://sourceforge.net/project/showfiles.php?group_id=7586&amp;package_id=8041">Boost downloads</a> or the <a class="reference" href="http://www.boostpro.com/products/free">installer</a> provided by <a class="reference" href="http://www.boostpro.com">BoostPro
Computing</a>. We especially recommend using an installer if you use Computing</a>. We especially recommend using an installer if you use
Microsoft Visual Studio, because the installer can download and Microsoft Visual Studio, because the installer can download and
install precompiled library binaries, saving you the trouble of install precompiled library binaries, saving you the trouble of
building them yourself. To complete this tutorial, you'll need to at building them yourself. To complete this tutorial, you'll need to at
least install the Static Multithreaded variants of the <a class="reference external" href="../../libs/regex/index.html">Boost.Regex</a> least install the Static Multithreaded variants of the <a class="reference" href="../../libs/regex/index.html">Boost.Regex</a>
binaries when given the option.</p> binaries when given the option.</p>
<p>If you're using an earlier version of Visual Studio or some other <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 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_39_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_39_0</span></tt><tt class="docutils literal"><span class="pre">.zip</span></tt></a> and unpack it to install a complete Boost download <a class="reference" href="http://sourceforge.net/project/showfiles.php?group_id=7586&amp;package_id=8041"><tt class="docutils literal"><span class="pre">boost_1_39_0</span></tt><tt class="docutils literal"><span class="pre">.7z</span></tt></a> or <a class="reference" href="http://sourceforge.net/project/showfiles.php?group_id=7586&amp;package_id=8041"><tt class="docutils literal"><span class="pre">boost_1_39_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> distribution.<a class="footnote-reference" href="#zip" id="id2" name="id2"><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">
<h1><a class="toc-backref" href="#id30">2&nbsp;&nbsp;&nbsp;The Boost Distribution</a></h1> <h1><a class="toc-backref" href="#id31" id="the-boost-distribution" name="the-boost-distribution">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_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>
@ -114,7 +114,7 @@ the Python library's <tt class="docutils literal"><span class="pre">def.hpp</spa
</li> </li>
<li><p class="first">Some libraries have an “aggregate header” in <tt class="docutils literal"><span class="pre">boost</span></tt><tt class="docutils literal"><span class="pre">\</span></tt> that <li><p class="first">Some libraries have an “aggregate header” in <tt class="docutils literal"><span class="pre">boost</span></tt><tt class="docutils literal"><span class="pre">\</span></tt> that
<tt class="docutils literal"><span class="pre">#include</span></tt>s all of the library's other headers. For <tt class="docutils literal"><span class="pre">#include</span></tt>s all of the library's other headers. For
example, <a class="reference external" href="../../libs/python/doc/building.html">Boost.Python</a>'s aggregate header is</p> example, <a class="reference" href="../../libs/python/doc/building.html">Boost.Python</a>'s aggregate header is</p>
<pre class="literal-block"> <pre class="literal-block">
<tt class="docutils literal"><span class="pre">boost</span></tt><tt class="docutils literal"><span class="pre">\</span></tt><tt class="docutils literal"><span class="pre">python.hpp</span></tt>. <tt class="docutils literal"><span class="pre">boost</span></tt><tt class="docutils literal"><span class="pre">\</span></tt><tt class="docutils literal"><span class="pre">python.hpp</span></tt>.
</pre> </pre>
@ -161,8 +161,8 @@ contains a subset of the Boost documentation. Start with
<!-- 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="header-only-libraries"> <div class="section">
<h1><a class="toc-backref" href="#id31">3&nbsp;&nbsp;&nbsp;Header-Only Libraries</a></h1> <h1><a class="toc-backref" href="#id32" id="header-only-libraries" name="header-only-libraries">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-nothing-to-build admonition">
@ -175,25 +175,26 @@ treatment when linking.</p>
<!-- .. _separate: --> <!-- .. _separate: -->
<p>The only Boost libraries that <em>must</em> be built separately are:</p> <p>The only Boost libraries that <em>must</em> be built separately are:</p>
<ul class="simple"> <ul class="simple">
<li><a class="reference external" href="../../libs/filesystem/index.html">Boost.Filesystem</a></li> <li><a class="reference" href="../../libs/filesystem/index.html">Boost.Filesystem</a></li>
<li><a class="reference external" href="../../libs/iostreams/index.html">Boost.IOStreams</a></li> <li><a class="reference" href="../../libs/iostreams/index.html">Boost.IOStreams</a></li>
<li><a class="reference external" href="../../libs/program_options/index.html">Boost.ProgramOptions</a></li> <li><a class="reference" href="../../libs/program_options/index.html">Boost.ProgramOptions</a></li>
<li><a class="reference external" href="../../libs/python/doc/building.html">Boost.Python</a> (see the <a class="reference external" href="../../libs/python/doc/building.html">Boost.Python build documentation</a> <li><a class="reference" href="../../libs/python/doc/building.html">Boost.Python</a> (see the <a class="reference" href="../../libs/python/doc/building.html">Boost.Python build documentation</a>
before building and installing it)</li> before building and installing it)</li>
<li><a class="reference external" href="../../libs/regex/index.html">Boost.Regex</a></li> <li><a class="reference" href="../../libs/regex/index.html">Boost.Regex</a></li>
<li><a class="reference external" href="../../libs/serialization/index.html">Boost.Serialization</a></li> <li><a class="reference" href="../../libs/serialization/index.html">Boost.Serialization</a></li>
<li><a class="reference external" href="../../libs/signals/index.html">Boost.Signals</a></li> <li><a class="reference" href="../../libs/signals/index.html">Boost.Signals</a></li>
<li><a class="reference external" href="../../doc/html/thread.html">Boost.Thread</a></li> <li><a class="reference" href="../../libs/system/index.html">Boost.System</a></li>
<li><a class="reference external" href="../../libs/wave/index.html">Boost.Wave</a></li> <li><a class="reference" href="../../doc/html/thread.html">Boost.Thread</a></li>
<li><a class="reference" href="../../libs/wave/index.html">Boost.Wave</a></li>
</ul> </ul>
<p>A few libraries have optional separately-compiled binaries:</p> <p>A few libraries have optional separately-compiled binaries:</p>
<ul class="simple"> <ul class="simple">
<li><a class="reference external" href="../../libs/date_time/index.html">Boost.DateTime</a> has a binary component that is only needed if <li><a class="reference" href="../../libs/date_time/index.html">Boost.DateTime</a> has a binary component that is only needed if
you're using its <tt class="docutils literal"><span class="pre">to_string</span></tt>/<tt class="docutils literal"><span class="pre">from_string</span></tt> or serialization you're using its <tt class="docutils literal"><span class="pre">to_string</span></tt>/<tt class="docutils literal"><span class="pre">from_string</span></tt> or serialization
features, or if you're targeting Visual C++ 6.x or Borland.</li> features, or if you're targeting Visual C++ 6.x or Borland.</li>
<li><a class="reference external" href="../../libs/graph/index.html">Boost.Graph</a> also has a binary component that is only needed if <li><a class="reference" href="../../libs/graph/index.html">Boost.Graph</a> also has a binary component that is only needed if
you intend to <a class="reference external" href="../../libs/graph/doc/read_graphviz.html">parse GraphViz files</a>.</li> you intend to <a class="reference" href="../../libs/graph/doc/read_graphviz.html">parse GraphViz files</a>.</li>
<li><a class="reference external" href="../../libs/test/index.html">Boost.Test</a> can be used in “header-only” or “separately compiled” <li><a class="reference" href="../../libs/test/index.html">Boost.Test</a> can be used in “header-only” or “separately compiled”
mode, although <strong>separate compilation is recommended for serious mode, although <strong>separate compilation is recommended for serious
use</strong>.</li> use</strong>.</li>
</ul> </ul>
@ -201,8 +202,8 @@ use</strong>.</li>
<!-- 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="build-a-simple-program-using-boost"> <div class="section">
<h1><a class="toc-backref" href="#id32">4&nbsp;&nbsp;&nbsp;Build a Simple Program Using Boost</a></h1> <h1><a class="toc-backref" href="#id33" id="build-a-simple-program-using-boost" name="build-a-simple-program-using-boost">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
@ -223,11 +224,11 @@ int main()
} }
</pre> </pre>
<p>Copy the text of this program into a file called <tt class="docutils literal"><span class="pre">example.cpp</span></tt>.</p> <p>Copy the text of this program into a file called <tt class="docutils literal"><span class="pre">example.cpp</span></tt>.</p>
<div class="note" id="command-line-tool"> <div class="note">
<span id="command-prompt"></span><p class="first admonition-title">Note</p> <p class="first admonition-title"><a id="command-line-tool" name="command-line-tool"><span id="command-prompt"></span>Note</a></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
you can issue commands from the <a class="reference internal" href="#command-prompt">command prompt</a>. Since every you can issue commands from the <a class="reference" href="#command-prompt">command prompt</a>. Since every
IDE and compiler has different options and Microsoft's are by IDE and compiler has different options and Microsoft's are by
far the dominant compilers on Windows, we only give specific far the dominant compilers on Windows, we only give specific
directions here for Visual Studio 2005 and .NET 2003 IDEs and directions here for Visual Studio 2005 and .NET 2003 IDEs and
@ -257,8 +258,8 @@ cd <tt class="docutils literal"><span class="pre">C:\Program</span> <span class=
caret (<tt class="docutils literal"><span class="pre">^</span></tt>) at the end of all but the last line. Some examples caret (<tt class="docutils literal"><span class="pre">^</span></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">
<span id="vs-header-only"></span><h2><a class="toc-backref" href="#id33">4.1&nbsp;&nbsp;&nbsp;Build From the Visual Studio IDE</a></h2> <h2><a class="toc-backref" href="#id34" id="build-from-the-visual-studio-ide" name="build-from-the-visual-studio-ide"><span id="vs-header-only"></span>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>
@ -281,7 +282,7 @@ Directories</em>, enter the path to the Boost root directory, for example</p>
</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="id5"><sup>3</sup></a></p> Headers</em>.<a class="footnote-reference" href="#pch" id="id5" name="id5"><sup>3</sup></a></p>
</li> </li>
<li><p class="first">Replace the contents of the <tt class="docutils literal"><span class="pre">example.cpp</span></tt> generated by the IDE <li><p class="first">Replace the contents of the <tt class="docutils literal"><span class="pre">example.cpp</span></tt> generated by the IDE
with the example code above.</p> with the example code above.</p>
@ -296,10 +297,10 @@ into the resulting window, followed by the Return key:</p>
</pre> </pre>
<p>Then hold down the control key and press &quot;Z&quot;, followed by the <p>Then hold down the control key and press &quot;Z&quot;, followed by the
Return key.</p> 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" 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">
<h2><a class="toc-backref" href="#id34">4.2&nbsp;&nbsp;&nbsp;Or, Build From the Command Prompt</a></h2> <h2><a class="toc-backref" href="#id35" id="or-build-from-the-command-prompt" name="or-build-from-the-command-prompt">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>
@ -309,8 +310,8 @@ Studio 2005 user, select</p>
<blockquote> <blockquote>
<em>All Programs</em> &gt; <em>Microsoft Visual Studio .NET 2003</em> <em>All Programs</em> &gt; <em>Microsoft Visual Studio .NET 2003</em>
&gt; <em>Visual Studio .NET Tools</em> &gt; <em>Visual Studio .NET 2003 Command Prompt</em></blockquote> &gt; <em>Visual Studio .NET Tools</em> &gt; <em>Visual Studio .NET 2003 Command Prompt</em></blockquote>
<p>to bring up a special <a class="reference internal" href="#command-prompt">command prompt</a> window set up for the <p>to bring up a special <a class="reference" href="#command-prompt">command prompt</a> window set up for the
Visual Studio compiler. In that window, set the <a class="reference internal" href="#current-directory">current Visual Studio compiler. In that window, set the <a class="reference" href="#current-directory">current
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">
@ -324,66 +325,81 @@ 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> </div>
<div class="section" id="errors-and-warnings"> <div class="section">
<h2><a class="toc-backref" href="#id35">4.3&nbsp;&nbsp;&nbsp;Errors and Warnings</a></h2> <h2><a class="toc-backref" href="#id36" id="errors-and-warnings" name="errors-and-warnings">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="id7"><sup>5</sup></a> <strong>Errors are another matter</strong>. If you're practical.<a class="footnote-reference" href="#warnings" id="id7" name="id7"><sup>5</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" 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" href="#boost-root-directory">Boost root directory</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="prepare-to-use-a-boost-library-binary"> <div class="section">
<h1><a class="toc-backref" href="#id36">5&nbsp;&nbsp;&nbsp;Prepare to Use a Boost Library Binary</a></h1> <h1><a class="toc-backref" href="#id37" id="prepare-to-use-a-boost-library-binary" name="prepare-to-use-a-boost-library-binary">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="install-visual-studio-binaries"> <div class="section">
<h2><a class="toc-backref" href="#id37">5.1&nbsp;&nbsp;&nbsp;Install Visual Studio Binaries</a></h2> <h2><a class="toc-backref" href="#id38" id="install-visual-studio-binaries" name="install-visual-studio-binaries">5.1&nbsp;&nbsp;&nbsp;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
all variants of the <a class="reference external" href="../../libs/regex/index.html">Boost.Regex</a> binary, you're done with this all variants of the <a class="reference" href="../../libs/regex/index.html">Boost.Regex</a> binary, you're done with this
step. Otherwise, please run the installer again and install them step. Otherwise, please run the installer again and install them
now.</p> 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" 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">
<h2><a class="toc-backref" href="#id38">5.2&nbsp;&nbsp;&nbsp;Or, Build Binaries From Source</a></h2> <h2><a class="toc-backref" href="#id39" id="or-simplified-build-from-source" name="or-simplified-build-from-source">5.2&nbsp;&nbsp;&nbsp;Or, Simplified Build From Source</a></h2>
<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
and change your current directory to the Boost root directory. Then, type
the following commands:</p>
<pre class="literal-block">
bootstrap
.\bjam
</pre>
<p>The first command prepares the Boost.Build system for use. The second
command invokes Boost.Build to build the separately-compiled Boost
libraries. Please consult the <a class="reference" href="http://www.boost.org/boost-build2/doc/html/bbv2/advanced/invocation.html">Boost.Build documentation</a> for a list
of options that can be passed to <tt class="docutils literal"><span class="pre">bjam</span></tt>.</p>
</div>
<div class="section">
<h2><a class="toc-backref" href="#id40" id="or-build-binaries-from-source" name="or-build-binaries-from-source">5.3&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" href="../../tools/build/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) -->
<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" href="../../tools/build/index.html">Boost.Build</a> is a text-based system for developing, testing, and
installing software. To use it, you'll need an executable called 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">
<h3><a class="toc-backref" href="#id39">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="#id41" id="get-bjam" name="get-bjam">5.3.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 <p><tt class="docutils literal"><span class="pre">bjam</span></tt> is the <a class="reference" 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>
<p>We suggest you <a class="reference external" href="http://sourceforge.net/project/showfiles.php?group_id=7586&amp;package_id=72941">download a pre-built <tt class="docutils literal"><span class="pre">bjam</span></tt> executable</a> for your platform. <p>We suggest you <a class="reference" href="http://sourceforge.net/project/showfiles.php?group_id=7586&amp;package_id=72941">download a pre-built <tt class="docutils literal"><span class="pre">bjam</span></tt> executable</a> for your platform.
Alternatively, you can build <tt class="docutils literal"><span class="pre">bjam</span></tt> yourself using <a class="reference external" href="../../doc/html/jam/building.html">these Alternatively, you can build <tt class="docutils literal"><span class="pre">bjam</span></tt> yourself using <a class="reference" href="../../doc/html/jam/building.html">these
instructions</a>.</p> instructions</a>.</p>
<p>Move the <tt class="docutils literal"><span class="pre">bjam</span></tt> executable into a directory in your PATH. You can <p>Move the <tt class="docutils literal"><span class="pre">bjam</span></tt> executable into a directory in your PATH. You can
see the list of directories in your PATH, separated by semicolons, 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">
<span id="toolset-name"></span><span id="toolset"></span><h3><a class="toc-backref" href="#id40">5.2.2&nbsp;&nbsp;&nbsp;Identify Your Toolset</a></h3> <h3><a class="toc-backref" href="#id42" id="identify-your-toolset" name="identify-your-toolset"><span id="toolset-name"></span><span id="toolset"></span>5.3.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/boost-build2/doc/html/bbv2/reference/tools.html">in the following table (an up-to-date list is always available <a class="reference" href="http://www.boost.org/boost-build2/doc/html/bbv2/reference/tools.html">in the
Boost.Build documentation</a>).</p> 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
<a class="reference external" href="../../doc/html/jam/building.html">building bjam</a>, you should assume it won't work and instead <a class="reference" href="../../doc/html/jam/building.html">building bjam</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">
@ -412,7 +428,7 @@ known to work well with Boost</td>
<tr><td><tt class="docutils literal"><span class="pre">como</span></tt></td> <tr><td><tt class="docutils literal"><span class="pre">como</span></tt></td>
<td>Comeau Computing</td> <td>Comeau Computing</td>
<td>Using this toolset may <td>Using this toolset may
require <a class="reference external" href="../../tools/build/index.html">configuring</a> another require <a class="reference" href="../../tools/build/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"><span class="pre">cw</span></tt></td> <tr><td><tt class="docutils literal"><span class="pre">cw</span></tt></td>
@ -475,43 +491,43 @@ a hyphen, e.g. <tt class="docutils literal"><span class="pre">intel-9.0</span></
<tt class="docutils literal"><span class="pre">borland-5.4.3</span></tt>. <strong>On Windows, append a version <tt class="docutils literal"><span class="pre">borland-5.4.3</span></tt>. <strong>On Windows, append a version
number even if you only have one version installed</strong> (unless you number even if you only have one version installed</strong> (unless you
are using the msvc or gcc toolsets, which have special version 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" href="#auto-linking">auto-linking</a> will fail.</p>
</div> </div>
<div class="section" id="select-a-build-directory"> <div class="section">
<span id="id13"></span><span id="build-directory"></span><h3><a class="toc-backref" href="#id41">5.2.3&nbsp;&nbsp;&nbsp;Select a Build Directory</a></h3> <h3><a class="toc-backref" href="#id43" id="select-a-build-directory" name="select-a-build-directory"><span id="id14"></span><span id="build-directory"></span>5.3.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" 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
default Boost.Build will create a <tt class="docutils literal"><span class="pre">bin.v2/</span></tt> subdirectory for that default Boost.Build will create a <tt class="docutils literal"><span class="pre">bin.v2/</span></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-bjam"> <div class="section">
<h3><a class="toc-backref" href="#id42">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="#id44" id="invoke-bjam" name="invoke-bjam">5.3.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 <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="#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 bjam <strong>--build-dir=</strong><a class="reference" href="#id14"><em>build-directory</em></a> <strong>toolset=</strong><a class="reference" 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/boost-build2/doc/html/bbv2/advanced/invocation.html">Boost.Build documentation</a>.</p> please see the <a class="reference" 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> <p>For example, your session might look like this:<a class="footnote-reference" href="#continuation" id="id16" name="id16"><sup>4</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> <span class="pre">Files\boost\</span></tt><tt class="docutils literal"><span class="pre">boost_1_39_0</span></tt> 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_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>&gt; 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>&gt; bjam <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>
<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>, <p>Be sure to read <a class="reference" 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> <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 option “<strong>--build-type=complete</strong>” causes <tt class="docutils literal"><span class="pre">bjam</span></tt> to build <p>The option “<strong>--build-type=complete</strong>” causes <tt class="docutils literal"><span class="pre">bjam</span></tt> 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" href="http://www.boost.org/more/mailing_lists.htm#jamboost">Boost.Build 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 -->
<!-- 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) -->
<p>Building the special <tt class="docutils literal"><span class="pre">stage</span></tt> target places Boost <p>Building the special <tt class="docutils literal"><span class="pre">stage</span></tt> target places Boost
library binaries in the <tt class="docutils literal"><span class="pre">stage</span></tt><tt class="docutils literal"><span class="pre">\</span></tt> subdirectory of your <a class="reference internal" href="#build-directory">build library binaries in the <tt class="docutils literal"><span class="pre">stage</span></tt><tt class="docutils literal"><span class="pre">\</span></tt><tt class="docutils literal"><span class="pre">lib</span></tt><tt class="docutils literal"><span class="pre">\</span></tt> subdirectory of your <a class="reference" href="#build-directory">build
directory</a>.</p> directory</a>.</p>
<div class="note"> <div class="note">
<p class="first admonition-title">Note</p> <p class="first admonition-title">Note</p>
@ -536,12 +552,12 @@ be interested in:</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
everything is went well, you might redirect the output into a everything is went well, you might redirect the output into a
file by appending “<tt class="docutils literal"><span class="pre">&gt;build.log</span> <span class="pre">2&gt;&amp;1</span></tt>” to your command line.</p> file by appending “``&gt;build.log 2&gt;&amp;1``” to your command line.</p>
</div> </div>
</div> </div>
</div> </div>
<div class="section" id="expected-build-output"> <div class="section">
<h2><a class="toc-backref" href="#id43">5.3&nbsp;&nbsp;&nbsp;Expected Build Output</a></h2> <h2><a class="toc-backref" href="#id45" id="expected-build-output" name="expected-build-output">5.4&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>
@ -564,28 +580,28 @@ look something like:</p>
</li> </li>
</ul> </ul>
</div> </div>
<div class="section" id="in-case-of-build-errors"> <div class="section">
<h2><a class="toc-backref" href="#id44">5.4&nbsp;&nbsp;&nbsp;In Case of Build Errors</a></h2> <h2><a class="toc-backref" href="#id46" id="in-case-of-build-errors" name="in-case-of-build-errors">5.5&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" href="../../libs/iostreams/doc/installation.html">here</a>. Install the relevant development
packages for libz and libbz2 if you need those features. Other 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/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 <a class="reference" 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 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" 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">
<h1><a class="toc-backref" href="#id45">6&nbsp;&nbsp;&nbsp;Link Your Program to a Boost Library</a></h1> <h1><a class="toc-backref" href="#id47" id="link-your-program-to-a-boost-library" name="link-your-program-to-a-boost-library">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" href="../../libs/regex/index.html">Boost.Regex</a> library, which has a
separately-compiled binary component.</p> separately-compiled binary component.</p>
<pre class="literal-block"> <pre class="literal-block">
#include &lt;boost/regex.hpp&gt; #include &lt;boost/regex.hpp&gt;
@ -623,12 +639,12 @@ information to encode the name of the correct library into your
object files; the linker selects the library with that name from object files; the linker selects the library with that name from
the directories you've told it to search.</p> the directories you've told it to search.</p>
<p class="last">The GCC toolchains (Cygwin and MinGW) are notable exceptions; <p class="last">The GCC toolchains (Cygwin and MinGW) are notable exceptions;
GCC users should refer to the <a class="reference external" href="unix-variants.html#link-your-program-to-a-boost-library">linking instructions for Unix GCC users should refer to the <a class="reference" href="unix-variants.html#link-your-program-to-a-boost-library">linking instructions for Unix
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">
<h2><a class="toc-backref" href="#id46">6.1&nbsp;&nbsp;&nbsp;Link From Within the Visual Studio IDE</a></h2> <h2><a class="toc-backref" href="#id48" id="link-from-within-the-visual-studio-ide" name="link-from-within-the-visual-studio-ide">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" href="#vs-header-only">header-only example project</a> we created
earlier:</p> earlier:</p>
<ol class="arabic simple"> <ol class="arabic simple">
<li>Right-click <strong>example</strong> in the <em>Solution Explorer</em> pane and <li>Right-click <strong>example</strong> in the <em>Solution Explorer</em> pane and
@ -638,10 +654,10 @@ Directories</em>, enter the path to the Boost binaries,
e.g. <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>.</li> e.g. <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>.</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" 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">
<h2><a class="toc-backref" href="#id47">6.2&nbsp;&nbsp;&nbsp;Or, Link From the Command Prompt</a></h2> <h2><a class="toc-backref" href="#id49" id="or-link-from-the-command-prompt" name="or-link-from-the-command-prompt">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
@ -651,12 +667,12 @@ cl /EHsc /I <em>path\to\</em><tt class="docutils literal"><span class="pre">boos
<strong>/link /LIBPATH:</strong> <strong>C:\Program Files\boost\</strong><strong>boost_1_39_0</strong><strong>\lib</strong> <strong>/link /LIBPATH:</strong> <strong>C:\Program Files\boost\</strong><strong>boost_1_39_0</strong><strong>\lib</strong>
</pre> </pre>
</div> </div>
<div class="section" id="library-naming"> <div class="section">
<h2><a class="toc-backref" href="#id48">6.3&nbsp;&nbsp;&nbsp;Library Naming</a></h2> <h2><a class="toc-backref" href="#id50" id="library-naming" name="library-naming">6.3&nbsp;&nbsp;&nbsp;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,
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" href="#test-your-program"><em>skip to the next step</em></a>.</p>
<blockquote class="last"> <blockquote class="last">
</blockquote> </blockquote>
</div> </div>
@ -674,11 +690,11 @@ 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="id23"><sup>6</sup></a></dd> not.<a class="footnote-reference" href="#distinct" id="id24" name="id24"><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>
<dd><em>Toolset tag</em>: identifies the <a class="reference internal" href="#toolset">toolset</a> and version used to build <dd><em>Toolset tag</em>: identifies the <a class="reference" href="#toolset">toolset</a> and version used to build
the binary.</dd> the binary.</dd>
<dt><tt class="docutils literal"><span class="pre">-mt</span></tt></dt> <dt><tt class="docutils literal"><span class="pre">-mt</span></tt></dt>
<dd><em>Threading tag</em>: indicates that the library was <dd><em>Threading tag</em>: indicates that the library was
@ -709,17 +725,17 @@ libraries.</td>
<td>using debug versions of the standard and runtime support libraries.</td> <td>using debug versions of the standard and runtime support libraries.</td>
</tr> </tr>
<tr><td><tt class="docutils literal"><span class="pre">y</span></tt></td> <tr><td><tt class="docutils literal"><span class="pre">y</span></tt></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" 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="id24"><sup>7</sup></a></td> <td>building a debug version of your code.<a class="footnote-reference" href="#debug-abi" id="id25" name="id25"><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="id25"><sup>8</sup></a></td> <td>using STLPort's deprecated “native iostreams” feature.<a class="footnote-reference" href="#native" id="id26" name="id26"><sup>8</sup></a></td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
@ -750,8 +766,8 @@ version number, will also be created.</dd>
<!-- 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="test-your-program"> <div class="section">
<h2><a class="toc-backref" href="#id49">6.4&nbsp;&nbsp;&nbsp;Test Your Program</a></h2> <h2><a class="toc-backref" href="#id51" id="test-your-program" name="test-your-program">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"><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">
@ -761,7 +777,7 @@ Subject: Will Success Spoil Rock Hunter?
--- ---
See subject. See subject.
</pre> </pre>
<p>Now, in a <a class="reference internal" href="#command-prompt">command prompt</a> window, type:</p> <p>Now, in a <a class="reference" href="#command-prompt">command prompt</a> window, type:</p>
<pre class="literal-block"> <pre class="literal-block">
<em>path</em>\<em>to</em>\<em>compiled</em>\example &lt; <em>path</em>\<em>to</em>\jayne.txt <em>path</em>\<em>to</em>\<em>compiled</em>\example &lt; <em>path</em>\<em>to</em>\jayne.txt
</pre> </pre>
@ -772,23 +788,23 @@ Spoil Rock Hunter?”</p>
<!-- 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="conclusion-and-further-resources"> <div class="section">
<h1><a class="toc-backref" href="#id50">7&nbsp;&nbsp;&nbsp;Conclusion and Further Resources</a></h1> <h1><a class="toc-backref" href="#id52" id="conclusion-and-further-resources" name="conclusion-and-further-resources">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
we may have a “Book 2 in the Getting Started series” that addresses we may have a “Book 2 in the Getting Started series” that addresses
them. Until then, we suggest you pursue the following resources. them. Until then, we suggest you pursue the following resources.
If you can't find what you need, or there's anything we can do to 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" 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/v2/index.html">Boost.Build reference manual</a></li> <li><a class="reference" href="../../tools/build/v2/index.html">Boost.Build reference manual</a></li>
<li><a class="reference external" href="../../tools/jam/index.html">Boost.Jam reference manual</a></li> <li><a class="reference" href="../../tools/jam/index.html">Boost.Jam 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" 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" href="http://www.boost.org/more/mailing_lists.htm#jamboost">Boost.Build mailing list</a></li>
<li><a class="reference external" href="http://www.crystalclearsoftware.com/cgi-bin/boost_wiki/wiki.pl?Boost.Build_V2">Boost.Build Wiki</a></li> <li><a class="reference" href="http://www.crystalclearsoftware.com/cgi-bin/boost_wiki/wiki.pl?Boost.Build_V2">Boost.Build Wiki</a></li>
<li><a class="reference external" href="../../libs/index.html">Index of all Boost library documentation</a></li> <li><a class="reference" href="../../libs/index.html">Index of all Boost library documentation</a></li>
</ul> </ul>
<div class="admonition-onward admonition"> <div class="admonition-onward admonition">
<p class="first admonition-title">Onward</p> <p class="first admonition-title">Onward</p>
@ -801,8 +817,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="#id2" name="zip">[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_39_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 downloading <a class="reference" href="http://sourceforge.net/project/showfiles.php?group_id=7586&amp;package_id=8041"><tt class="docutils literal"><span class="pre">boost_1_39_0</span></tt><tt class="docutils literal"><span class="pre">.7z</span></tt></a> and using <a class="reference" 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>
@ -811,7 +827,7 @@ built-in decompression as it can be painfully slow for large archives.</td></tr>
<table class="docutils footnote" frame="void" id="installer-src" rules="none"> <table class="docutils footnote" frame="void" id="installer-src" rules="none">
<colgroup><col class="label" /><col /></colgroup> <colgroup><col class="label" /><col /></colgroup>
<tbody valign="top"> <tbody valign="top">
<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 <tr><td class="label"><a name="installer-src">[2]</a></td><td>If you used the <a class="reference" href="http://www.boostpro.com/products/free">installer</a> from Boost
Consulting and deselected “Source and Documentation” (it's 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. 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 That won't affect your ability to use precompiled binaries, but
@ -821,7 +837,7 @@ you won't be able to rebuild libraries from scratch.</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="#id5">[3]</a></td><td>There's no problem using Boost with precompiled headers; <tr><td class="label"><a class="fn-backref" href="#id5" name="pch">[3]</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>
@ -830,7 +846,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">[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="#id16" name="continuation">[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
@ -857,7 +873,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="#id7">[5]</a></td><td>Remember that warnings are specific to each compiler <tr><td class="label"><a class="fn-backref" href="#id7" name="warnings">[5]</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
@ -868,7 +884,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">[6]</a></td><td>This convention distinguishes the static version of <tr><td class="label"><a class="fn-backref" href="#id24" name="distinct">[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>
@ -877,7 +893,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">[7]</a></td><td>These libraries were compiled without optimization <tr><td class="label"><a class="fn-backref" href="#id25" name="debug-abi">[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
@ -887,7 +903,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="#id25">[8]</a></td><td>This feature of STLPort is deprecated because it's <tr><td class="label"><a class="fn-backref" href="#id26" name="native">[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>

View File

@ -199,6 +199,24 @@ now.
__ `Link Your Program to a Boost Library`_ __ `Link Your Program to a Boost Library`_
Or, Simplified Build From Source
--------------------------------
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
and change your current directory to the Boost root directory. Then, type
the following commands::
bootstrap
.\bjam
The first command prepares the Boost.Build system for use. The second
command invokes Boost.Build to build the separately-compiled Boost
libraries. Please consult the `Boost.Build documentation`__ for a list
of options that can be passed to ``bjam``.
__ http://www.boost.org/boost-build2/doc/html/bbv2/advanced/invocation.html
Or, Build Binaries From Source Or, Build Binaries From Source
------------------------------ ------------------------------