mirror of
https://github.com/boostorg/more.git
synced 2026-08-24 13:23:31 +08:00
Compare commits
10 Commits
boost-1.75
...
boost-1.81
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3f58b37f6f | ||
|
|
613c712508 | ||
|
|
631827729b | ||
|
|
cbbd4179e6 | ||
|
|
8333cb17a8 | ||
|
|
c4df659b3d | ||
|
|
64ce374994 | ||
|
|
863cc8eb27 | ||
|
|
422ad51772 | ||
|
|
b3dfe6529a |
@@ -15,7 +15,7 @@ install it. To do this:
|
||||
the directory where you want Boost.Build to be installed
|
||||
4. Add *PREFIX*\ |/|\ ``bin`` to your PATH environment variable.
|
||||
|
||||
.. _Boost.Build: ../../tools/build/index.html
|
||||
.. _Boost.Build: ../../tools/build/doc/html/index.html
|
||||
.. _Boost.Build documentation: Boost.Build_
|
||||
|
||||
.. _toolset:
|
||||
@@ -28,13 +28,13 @@ First, find the toolset corresponding to your compiler in the
|
||||
following table (an up-to-date list is always available `in the
|
||||
Boost.Build documentation`__).
|
||||
|
||||
__ https://boostorg.github.io/build/manual/develop/index.html#bbv2.reference.tools
|
||||
__ ../../tools/build/doc/html/index.html#bbv2.reference.tools
|
||||
|
||||
.. Note:: If you previously chose a toolset for the purposes of
|
||||
`building b2`_, you should assume it won't work and instead
|
||||
choose newly from the table below.
|
||||
|
||||
.. _building b2: ../../doc/html/bbv2/installation.html
|
||||
.. _building b2: ../../tools/build/doc/html/index.html#bbv2.installation
|
||||
|
||||
+-----------+--------------------+------------------------------------------------------------+
|
||||
|Toolset |Vendor |Notes |
|
||||
@@ -109,5 +109,5 @@ invoke ``b2`` as follows:
|
||||
For a complete description of these and other invocation options,
|
||||
please see the `Boost.Build documentation`__.
|
||||
|
||||
__ http://www.boost.org/build/doc/html/bbv2/overview/invocation.html
|
||||
__ ../../tools/build/doc/html/index.html#bbv2.overview.invocation
|
||||
|
||||
|
||||
@@ -68,6 +68,6 @@ If it seems like the build system can't find your compiler and/or
|
||||
linker, consider setting up a ``user-config.jam`` file as described
|
||||
`here`__. If that isn't your problem or the ``user-config.jam`` file
|
||||
doesn't work for you, please address questions about configuring Boost
|
||||
for your compiler to the `Boost.Build mailing list`_.
|
||||
for your compiler to the `Boost Users' mailing list`_.
|
||||
|
||||
__ http://www.boost.org/build/doc/html/bbv2/overview/configuration.html
|
||||
__ ../../tools/build/doc/html/index.html#bbv2.overview.configuration
|
||||
|
||||
@@ -16,7 +16,6 @@ mailing list`_.
|
||||
|
||||
* `Boost.Build reference manual`_
|
||||
* `Boost Users' mailing list`_
|
||||
* `Boost.Build mailing list`_
|
||||
* `Index of all Boost library documentation`_
|
||||
|
||||
.. _Index of all Boost library documentation: ../../libs/index.html
|
||||
@@ -29,7 +28,6 @@ mailing list`_.
|
||||
|
||||
-- the Boost Developers
|
||||
|
||||
.. _Boost.Build reference manual: ../../tools/build/index.html
|
||||
.. _Boost.Build reference manual: ../../tools/build/doc/html/index.html
|
||||
.. _Boost Users' mailing list: http://www.boost.org/more/mailing_lists.htm#users
|
||||
.. _Boost.Build mailing list: http://www.boost.org/more/mailing_lists.htm#jamboost
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
.. This file contains all the definitions that need to be updated
|
||||
.. for each new release of Boost.
|
||||
|
||||
.. |boost-version-number| replace:: 75
|
||||
.. |boost_ver| replace:: ``boost_1_75_0``
|
||||
.. |boost_ver-bold| replace:: **boost_1_75_0**
|
||||
.. |boost-version-number| replace:: 81
|
||||
.. |boost_ver| replace:: ``boost_1_81_0``
|
||||
.. |boost_ver-bold| replace:: **boost_1_81_0**
|
||||
|
||||
.. _sf-download: http://www.boost.org/users/history/version_1_75_0.html
|
||||
.. _sf-download: http://www.boost.org/users/history/version_1_81_0.html
|
||||
|
||||
@@ -3,18 +3,18 @@
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
|
||||
<meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />
|
||||
<title>Boost Getting Started</title>
|
||||
<link rel="stylesheet" href="../../rst.css" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div class="document" id="logo-getting-started">
|
||||
<h1 class="title"><a class="reference external" href="../../index.htm"><img alt="Boost" class="boost-logo" src="../../boost.png" /></a> Getting Started</h1>
|
||||
<h1 class="title"><a class="reference external image-reference" href="../../index.htm"><img alt="Boost" class="boost-logo" src="../../boost.png" /></a> Getting Started</h1>
|
||||
|
||||
<!-- Copyright David Abrahams 2006. Distributed under the Boost -->
|
||||
<!-- Software License, Version 1.0. (See accompanying -->
|
||||
<!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -->
|
||||
<div class="admonition-use-the-latest-version-of-this-getting-started-guide admonition">
|
||||
<div class="admonition admonition-use-the-latest-version-of-this-getting-started-guide">
|
||||
<p class="first admonition-title">Use the latest version of this Getting Started guide</p>
|
||||
<p class="last">The <a class="reference external" href="http://www.boost.org/more/getting_started/index.html">Boost website version of this Getting Started guide</a> may
|
||||
have updated information, such as the location of additional installers
|
||||
|
||||
@@ -3,14 +3,14 @@
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
|
||||
<meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />
|
||||
<title>Boost Getting Started on Unix Variants</title>
|
||||
<meta content="Getting Started with Boost on Unix Variants (including Linux and MacOS)" name="description" />
|
||||
<link rel="stylesheet" href="../../rst.css" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div class="document" id="logo-getting-started-on-unix-variants">
|
||||
<h1 class="title"><a class="reference external" href="../../index.htm"><img alt="Boost" class="boost-logo" src="../../boost.png" /></a> Getting Started on Unix Variants</h1>
|
||||
<h1 class="title"><a class="reference external image-reference" href="../../index.htm"><img alt="Boost" class="boost-logo" src="../../boost.png" /></a> Getting Started on Unix Variants</h1>
|
||||
|
||||
<!-- Copyright David Abrahams 2006. Distributed under the Boost -->
|
||||
<!-- Software License, Version 1.0. (See accompanying -->
|
||||
@@ -28,7 +28,7 @@
|
||||
.. _Cygwin: http://www.cygwin.com
|
||||
.. _MinGW: http://mingw.org -->
|
||||
<div class="contents topic" id="index">
|
||||
<p class="topic-title first">Index</p>
|
||||
<p class="topic-title">Index</p>
|
||||
<ul class="auto-toc simple">
|
||||
<li><a class="reference internal" href="#get-boost" id="id20">1 Get Boost</a></li>
|
||||
<li><a class="reference internal" href="#the-boost-distribution" id="id21">2 The Boost Distribution</a></li>
|
||||
@@ -61,18 +61,18 @@
|
||||
<div class="section" id="get-boost">
|
||||
<h1><a class="toc-backref" href="#id20">1 Get Boost</a></h1>
|
||||
<p>The most reliable way to get a copy of Boost is to download a
|
||||
distribution from <a class="reference external" href="http://www.boost.org/users/history/version_1_75_0.html">SourceForge</a>:</p>
|
||||
distribution from <a class="reference external" href="http://www.boost.org/users/history/version_1_81_0.html">SourceForge</a>:</p>
|
||||
<ol class="arabic">
|
||||
<li><p class="first">Download <a class="reference external" href="http://www.boost.org/users/history/version_1_75_0.html"><tt class="docutils literal">boost_1_75_0</tt><tt class="docutils literal">.tar.bz2</tt></a>.</p>
|
||||
<li><p class="first">Download <a class="reference external" href="http://www.boost.org/users/history/version_1_81_0.html"><tt class="docutils literal">boost_1_81_0</tt><tt class="docutils literal">.tar.bz2</tt></a>.</p>
|
||||
</li>
|
||||
<li><p class="first">In the directory where you want to put the Boost installation,
|
||||
execute</p>
|
||||
<pre class="literal-block">
|
||||
tar --bzip2 -xf <em>/path/to/</em><tt class="docutils literal">boost_1_75_0</tt>.tar.bz2
|
||||
tar --bzip2 -xf <em>/path/to/</em><tt class="docutils literal">boost_1_81_0</tt>.tar.bz2
|
||||
</pre>
|
||||
</li>
|
||||
</ol>
|
||||
<div class="admonition-other-packages admonition">
|
||||
<div class="admonition admonition-other-packages">
|
||||
<p class="first admonition-title">Other Packages</p>
|
||||
<p class="last">RedHat, Debian, and other distribution packagers supply Boost
|
||||
library packages, however you may need to adapt these
|
||||
@@ -81,7 +81,7 @@ creators usually choose to break Boost up into several packages,
|
||||
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
|
||||
any trouble, we suggest using an official Boost distribution
|
||||
from <a class="reference external" href="http://www.boost.org/users/history/version_1_75_0.html">SourceForge</a>.</p>
|
||||
from <a class="reference external" href="http://www.boost.org/users/history/version_1_81_0.html">SourceForge</a>.</p>
|
||||
</div>
|
||||
<!-- Copyright David Abrahams 2006. Distributed under the Boost -->
|
||||
<!-- Software License, Version 1.0. (See accompanying -->
|
||||
@@ -91,10 +91,10 @@ from <a class="reference external" href="http://www.boost.org/users/history/vers
|
||||
<h1><a class="toc-backref" href="#id21">2 The Boost Distribution</a></h1>
|
||||
<p>This is a sketch of the resulting directory structure:</p>
|
||||
<pre class="literal-block">
|
||||
<strong>boost_1_75_0</strong><strong>/</strong> .................<em>The “boost root directory”</em>
|
||||
<strong>boost_1_81_0</strong><strong>/</strong> .................<em>The “boost root directory”</em>
|
||||
<strong>index.htm</strong> .........<em>A copy of www.boost.org starts here</em>
|
||||
<strong>boost</strong><strong>/</strong> .........................<em>All Boost Header files</em>
|
||||
<tt class="docutils literal"> </tt>
|
||||
`` ``
|
||||
<strong>libs</strong><strong>/</strong> ............<em>Tests, .cpp</em>s<em>, docs, etc., by library</em>
|
||||
<strong>index.html</strong> ........<em>Library documentation starts here</em>
|
||||
<strong>algorithm</strong><strong>/</strong>
|
||||
@@ -136,12 +136,12 @@ anything you can use in these directories.</p>
|
||||
</div>
|
||||
<p>It's important to note the following:</p>
|
||||
<ol class="arabic" id="boost-root-directory">
|
||||
<li><p class="first">The path to the <strong>boost root directory</strong> (often <tt class="docutils literal">/usr/local/</tt><tt class="docutils literal">boost_1_75_0</tt>) is
|
||||
<li><p class="first">The path to the <strong>boost root directory</strong> (often <tt class="docutils literal">/usr/local/</tt><tt class="docutils literal">boost_1_81_0</tt>) is
|
||||
sometimes referred to as <tt class="docutils literal">$BOOST_ROOT</tt> in documentation and
|
||||
mailing lists .</p>
|
||||
</li>
|
||||
<li><p class="first">To compile anything in Boost, you need a directory containing
|
||||
the <tt class="docutils literal">boost</tt><tt class="docutils literal">/</tt> subdirectory in your <tt class="docutils literal">#include</tt> path. <tt class="docutils literal"> </tt></p>
|
||||
the <tt class="docutils literal">boost</tt><tt class="docutils literal">/</tt> subdirectory in your <tt class="docutils literal">#include</tt> path. `` ``</p>
|
||||
</li>
|
||||
<li><p class="first">Since all of Boost's header files have the <tt class="docutils literal">.hpp</tt> extension,
|
||||
and live in the <tt class="docutils literal">boost</tt><tt class="docutils literal">/</tt> subdirectory of the boost root, your
|
||||
@@ -154,7 +154,7 @@ Boost <tt class="docutils literal">#include</tt> directives will look like:</p>
|
||||
#include "boost/<em>whatever</em>.hpp"
|
||||
</pre>
|
||||
<p>depending on your preference regarding the use of angle bracket
|
||||
includes. <tt class="docutils literal"> </tt></p>
|
||||
includes. `` ``</p>
|
||||
</li>
|
||||
<li><p class="first">Don't be distracted by the <tt class="docutils literal">doc</tt><tt class="docutils literal">/</tt> subdirectory; it only
|
||||
contains a subset of the Boost documentation. Start with
|
||||
@@ -169,7 +169,7 @@ contains a subset of the Boost documentation. Start with
|
||||
<h1><a class="toc-backref" href="#id22">3 Header-Only Libraries</a></h1>
|
||||
<p>The first thing many people want to know is, “how do I build
|
||||
Boost?” The good news is that often, there's nothing to build.</p>
|
||||
<div class="admonition-nothing-to-build admonition">
|
||||
<div class="admonition admonition-nothing-to-build">
|
||||
<p class="first admonition-title">Nothing to Build?</p>
|
||||
<p class="last">Most Boost libraries are <strong>header-only</strong>: they consist <em>entirely
|
||||
of header files</em> containing templates and inline functions, and
|
||||
@@ -244,7 +244,7 @@ int main()
|
||||
<p>Now, in the directory where you saved <tt class="docutils literal">example.cpp</tt>, issue the
|
||||
following command:</p>
|
||||
<pre class="literal-block">
|
||||
c++ -I <em>path/to/</em><tt class="docutils literal">boost_1_75_0</tt> example.cpp -o example
|
||||
c++ -I <em>path/to/</em><tt class="docutils literal">boost_1_81_0</tt> example.cpp -o example
|
||||
</pre>
|
||||
<p>To test the result, type:</p>
|
||||
<pre class="literal-block">
|
||||
@@ -275,7 +275,7 @@ you'll need to acquire library binaries.</p>
|
||||
<p>Issue the following commands in the shell (don't type <tt class="docutils literal">$</tt>; that
|
||||
represents the shell's prompt):</p>
|
||||
<pre class="literal-block">
|
||||
<strong>$</strong> cd <em>path/to/</em><tt class="docutils literal">boost_1_75_0</tt>
|
||||
<strong>$</strong> cd <em>path/to/</em><tt class="docutils literal">boost_1_81_0</tt>
|
||||
<strong>$</strong> ./bootstrap.sh --help
|
||||
</pre>
|
||||
<p>Select your configuration options and invoke <tt class="docutils literal">./bootstrap.sh</tt> again
|
||||
@@ -301,16 +301,16 @@ path in place of the Boost root directory.</p>
|
||||
<div class="section" id="or-build-custom-binaries">
|
||||
<h2><a class="toc-backref" href="#id27">5.2 Or, Build Custom Binaries</a></h2>
|
||||
<p>If you're using a compiler other than your system's default, you'll
|
||||
need to use <a class="reference external" href="../../tools/build/index.html">Boost.Build</a> to create binaries.</p>
|
||||
need to use <a class="reference external" href="../../tools/build/doc/html/index.html">Boost.Build</a> to create binaries.</p>
|
||||
<p>You'll also
|
||||
use this method if you need a nonstandard build variant (see the
|
||||
<a class="reference external" href="../../tools/build/index.html">Boost.Build documentation</a> for more details).</p>
|
||||
<a class="reference external" href="../../tools/build/doc/html/index.html">Boost.Build documentation</a> for more details).</p>
|
||||
<!-- Copyright David Abrahams 2006. Distributed under the Boost -->
|
||||
<!-- Software License, Version 1.0. (See accompanying -->
|
||||
<!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -->
|
||||
<div class="section" id="install-boost-build">
|
||||
<h3><a class="toc-backref" href="#id28">5.2.1 Install Boost.Build</a></h3>
|
||||
<p><a class="reference external" href="../../tools/build/index.html">Boost.Build</a> is a text-based system for developing, testing, and
|
||||
<p><a class="reference external" href="../../tools/build/doc/html/index.html">Boost.Build</a> is a text-based system for developing, testing, and
|
||||
installing software. First, you'll need to build and
|
||||
install it. To do this:</p>
|
||||
<ol class="arabic simple">
|
||||
@@ -324,12 +324,12 @@ the directory where you want Boost.Build to be installed</li>
|
||||
<div class="section" id="identify-your-toolset">
|
||||
<span id="toolset-name"></span><span id="toolset"></span><h3><a class="toc-backref" href="#id29">5.2.2 Identify Your Toolset</a></h3>
|
||||
<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="https://boostorg.github.io/build/manual/develop/index.html#bbv2.reference.tools">in the
|
||||
following table (an up-to-date list is always available <a class="reference external" href="../../tools/build/doc/html/index.html#bbv2.reference.tools">in the
|
||||
Boost.Build documentation</a>).</p>
|
||||
<div class="note">
|
||||
<div class="admonition note">
|
||||
<p class="first admonition-title">Note</p>
|
||||
<p class="last">If you previously chose a toolset for the purposes of
|
||||
<a class="reference external" href="../../doc/html/bbv2/installation.html">building b2</a>, you should assume it won't work and instead
|
||||
<a class="reference external" href="../../tools/build/doc/html/index.html#bbv2.installation">building b2</a>, you should assume it won't work and instead
|
||||
choose newly from the table below.</p>
|
||||
</div>
|
||||
<table border="1" class="docutils">
|
||||
@@ -356,7 +356,7 @@ Name</th>
|
||||
</tr>
|
||||
<tr><td><tt class="docutils literal">como</tt></td>
|
||||
<td>Comeau Computing</td>
|
||||
<td>Using this toolset may require <a class="reference external" href="../../tools/build/index.html">configuring</a> another
|
||||
<td>Using this toolset may require <a class="reference external" href="../../tools/build/doc/html/index.html">configuring</a> another
|
||||
toolset to act as its backend.</td>
|
||||
</tr>
|
||||
<tr><td><tt class="docutils literal">darwin</tt></td>
|
||||
@@ -403,11 +403,11 @@ the Apache standard library in C++03 mode use
|
||||
<p>If you have multiple versions of a particular compiler installed,
|
||||
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
|
||||
<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>. `` ``</p>
|
||||
</div>
|
||||
<div class="section" id="select-a-build-directory">
|
||||
<span id="id11"></span><span id="build-directory"></span><h3><a class="toc-backref" href="#id30">5.2.3 Select a Build Directory</a></h3>
|
||||
<p><a class="reference external" href="../../tools/build/index.html">Boost.Build</a> will place all intermediate files it generates while
|
||||
<p><a class="reference external" href="../../tools/build/doc/html/index.html">Boost.Build</a> will place all intermediate files it generates while
|
||||
building into the <strong>build directory</strong>. If your Boost root
|
||||
directory is writable, this step isn't strictly necessary: by
|
||||
default Boost.Build will create a <tt class="docutils literal">bin.v2/</tt> subdirectory for that
|
||||
@@ -418,13 +418,13 @@ purpose in your current working directory.</p>
|
||||
<p>Change your current directory to the Boost root directory and
|
||||
invoke <tt class="docutils literal">b2</tt> as follows:</p>
|
||||
<pre class="literal-block">
|
||||
b2 <strong>--build-dir=</strong><a class="reference internal" href="#id11"><em>build-directory</em></a> <strong>toolset=</strong><a class="reference internal" href="#toolset-name"><em>toolset-name</em></a> <tt class="docutils literal"> </tt> stage
|
||||
b2 <strong>--build-dir=</strong><a class="reference internal" href="#id11"><em>build-directory</em></a> <strong>toolset=</strong><a class="reference internal" href="#toolset-name"><em>toolset-name</em></a> `` `` stage
|
||||
</pre>
|
||||
<p>For a complete description of these and other invocation options,
|
||||
please see the <a class="reference external" href="http://www.boost.org/build/doc/html/bbv2/overview/invocation.html">Boost.Build documentation</a>.</p>
|
||||
please see the <a class="reference external" href="../../tools/build/doc/html/index.html#bbv2.overview.invocation">Boost.Build documentation</a>.</p>
|
||||
<p>For example, your session might look like this:</p>
|
||||
<pre class="literal-block">
|
||||
$ cd ~/<tt class="docutils literal">boost_1_75_0</tt>
|
||||
$ cd ~/<tt class="docutils literal">boost_1_81_0</tt>
|
||||
$ b2 <strong>--build-dir=</strong>/tmp/build-boost <strong>toolset=</strong>gcc stage
|
||||
</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>
|
||||
@@ -435,7 +435,7 @@ $ b2 <strong>--build-dir=</strong>/tmp/build-boost <strong>toolset=</strong>gcc
|
||||
library binaries in the <tt class="docutils literal">stage</tt><tt class="docutils literal">/</tt><tt class="docutils literal">lib</tt><tt class="docutils literal">/</tt> subdirectory of
|
||||
the Boost tree. To use a different directory pass the
|
||||
<tt class="docutils literal"><span class="pre">--stagedir=</span></tt><em>directory</em> option to <tt class="docutils literal">b2</tt>.</p>
|
||||
<div class="note">
|
||||
<div class="admonition note">
|
||||
<p class="first admonition-title">Note</p>
|
||||
<p class="last"><tt class="docutils literal">b2</tt> is case-sensitive; it is important that all the
|
||||
parts shown in <strong>bold</strong> type above be entirely lower-case.</p>
|
||||
@@ -453,7 +453,7 @@ be interested in:</p>
|
||||
<li>choosing a specific build variant by adding <tt class="docutils literal">release</tt> or
|
||||
<tt class="docutils literal">debug</tt> to the command line.</li>
|
||||
</ul>
|
||||
<div class="note">
|
||||
<div class="admonition note">
|
||||
<p class="first admonition-title">Note</p>
|
||||
<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
|
||||
@@ -495,9 +495,9 @@ packages for libz and libbz2 if you need those features. Other
|
||||
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
|
||||
linker, consider setting up a <tt class="docutils literal"><span class="pre">user-config.jam</span></tt> file as described
|
||||
<a class="reference external" href="http://www.boost.org/build/doc/html/bbv2/overview/configuration.html">here</a>. If that isn't your problem or the <tt class="docutils literal"><span class="pre">user-config.jam</span></tt> file
|
||||
<a class="reference external" href="../../tools/build/doc/html/index.html#bbv2.overview.configuration">here</a>. If that isn't your problem or the <tt class="docutils literal"><span class="pre">user-config.jam</span></tt> file
|
||||
doesn't work for you, please address questions about configuring Boost
|
||||
for your compiler to the <a class="reference external" href="http://www.boost.org/more/mailing_lists.htm#jamboost">Boost.Build mailing list</a>.</p>
|
||||
for your compiler to the <a class="reference external" href="http://www.boost.org/more/mailing_lists.htm#users">Boost Users' mailing list</a>.</p>
|
||||
<!-- Copyright David Abrahams 2006. Distributed under the Boost -->
|
||||
<!-- Software License, Version 1.0. (See accompanying -->
|
||||
<!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -->
|
||||
@@ -540,14 +540,14 @@ project.</li>
|
||||
<ol class="upperalpha">
|
||||
<li><p class="first">You can specify the full path to each library:</p>
|
||||
<pre class="literal-block">
|
||||
$ c++ -I <em>path/to/</em><tt class="docutils literal">boost_1_75_0</tt> example.cpp -o example <strong>\</strong>
|
||||
$ c++ -I <em>path/to/</em><tt class="docutils literal">boost_1_81_0</tt> example.cpp -o example <strong>\</strong>
|
||||
<strong>~/boost/stage/lib/libboost_regex-gcc34-mt-d-1_36.a</strong>
|
||||
</pre>
|
||||
</li>
|
||||
<li><p class="first">You can separately specify a directory to search (with <tt class="docutils literal"><span class="pre">-L</span></tt><em>directory</em>) and a library name to search for (with <tt class="docutils literal"><span class="pre">-l</span></tt><em>library</em>,<a class="footnote-reference" href="#lowercase-l" id="id15"><sup>2</sup></a> dropping the filename's leading <tt class="docutils literal">lib</tt> and trailing
|
||||
suffix (<tt class="docutils literal">.a</tt> in this case):</p>
|
||||
<pre class="literal-block">
|
||||
$ c++ -I <em>path/to/</em><tt class="docutils literal">boost_1_75_0</tt> example.cpp -o example <strong>\</strong>
|
||||
$ c++ -I <em>path/to/</em><tt class="docutils literal">boost_1_81_0</tt> example.cpp -o example <strong>\</strong>
|
||||
<strong>-L~/boost/stage/lib/ -lboost_regex-gcc34-mt-d-1_36</strong>
|
||||
</pre>
|
||||
<p>As you can see, this method is just as terse as method A for one
|
||||
@@ -778,12 +778,11 @@ If you can't find what you need, or there's anything we can do to
|
||||
make this document clearer, please post it to the <a class="reference external" href="http://www.boost.org/more/mailing_lists.htm#users">Boost Users'
|
||||
mailing list</a>.</p>
|
||||
<ul class="simple">
|
||||
<li><a class="reference external" href="../../tools/build/index.html">Boost.Build reference manual</a></li>
|
||||
<li><a class="reference external" href="../../tools/build/doc/html/index.html">Boost.Build reference manual</a></li>
|
||||
<li><a class="reference external" href="http://www.boost.org/more/mailing_lists.htm#users">Boost Users' mailing list</a></li>
|
||||
<li><a class="reference external" href="http://www.boost.org/more/mailing_lists.htm#jamboost">Boost.Build mailing list</a></li>
|
||||
<li><a class="reference external" href="../../libs/index.html">Index of all Boost library documentation</a></li>
|
||||
</ul>
|
||||
<div class="admonition-onward admonition">
|
||||
<div class="admonition admonition-onward">
|
||||
<p class="first admonition-title">Onward</p>
|
||||
<blockquote class="epigraph last">
|
||||
<p>Good luck, and have fun!</p>
|
||||
|
||||
@@ -3,18 +3,18 @@
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
|
||||
<meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />
|
||||
<title>Boost Getting Started on Windows</title>
|
||||
<link rel="stylesheet" href="../../rst.css" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div class="document" id="logo-getting-started-on-windows">
|
||||
<h1 class="title"><a class="reference external" href="../../index.htm"><img alt="Boost" class="boost-logo" src="../../boost.png" /></a> Getting Started on Windows</h1>
|
||||
<h1 class="title"><a class="reference external image-reference" href="../../index.htm"><img alt="Boost" class="boost-logo" src="../../boost.png" /></a> Getting Started on Windows</h1>
|
||||
|
||||
<!-- Copyright David Abrahams 2006. Distributed under the Boost -->
|
||||
<!-- Software License, Version 1.0. (See accompanying -->
|
||||
<!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -->
|
||||
<div class="admonition-a-note-to-cygwin-and-mingw-users admonition">
|
||||
<div class="admonition admonition-a-note-to-cygwin-and-mingw-users">
|
||||
<p class="first admonition-title">A note to <a class="reference external" href="http://www.cygwin.com">Cygwin</a> and <a class="reference external" href="http://mingw.org">MinGW</a> users</p>
|
||||
<p class="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>
|
||||
@@ -24,7 +24,7 @@ variants</a>. Other command shells, such as <a class="reference external" href=
|
||||
not supported—they may or may not work.</p>
|
||||
</div>
|
||||
<div class="contents topic" id="index">
|
||||
<p class="topic-title first">Index</p>
|
||||
<p class="topic-title">Index</p>
|
||||
<ul class="auto-toc simple">
|
||||
<li><a class="reference internal" href="#get-boost" id="id28">1 Get Boost</a></li>
|
||||
<li><a class="reference internal" href="#the-boost-distribution" id="id29">2 The Boost Distribution</a></li>
|
||||
@@ -61,7 +61,7 @@ not supported—they may or may not work.</p>
|
||||
<div class="section" id="get-boost">
|
||||
<h1><a class="toc-backref" href="#id28">1 Get Boost</a></h1>
|
||||
<p>The most reliable way to get a copy of Boost is to
|
||||
download <a class="reference external" href="http://www.boost.org/users/history/version_1_75_0.html"><tt class="docutils literal">boost_1_75_0</tt><tt class="docutils literal">.7z</tt></a> or <a class="reference external" href="http://www.boost.org/users/history/version_1_75_0.html"><tt class="docutils literal">boost_1_75_0</tt><tt class="docutils literal">.zip</tt></a> and unpack it to install a complete Boost
|
||||
download <a class="reference external" href="http://www.boost.org/users/history/version_1_81_0.html"><tt class="docutils literal">boost_1_81_0</tt><tt class="docutils literal">.7z</tt></a> or <a class="reference external" href="http://www.boost.org/users/history/version_1_81_0.html"><tt class="docutils literal">boost_1_81_0</tt><tt class="docutils literal">.zip</tt></a> and unpack it to install a complete Boost
|
||||
distribution.<a class="footnote-reference" href="#zip" id="id2"><sup>1</sup></a></p>
|
||||
<!-- Copyright David Abrahams 2006. Distributed under the Boost -->
|
||||
<!-- Software License, Version 1.0. (See accompanying -->
|
||||
@@ -71,7 +71,7 @@ distribution.<a class="footnote-reference" href="#zip" id="id2"><sup>1</sup></a>
|
||||
<h1><a class="toc-backref" href="#id29">2 The Boost Distribution</a></h1>
|
||||
<p>This is a sketch of the resulting directory structure:</p>
|
||||
<pre class="literal-block">
|
||||
<strong>boost_1_75_0</strong><strong>\</strong> .................<em>The “boost root directory”</em>
|
||||
<strong>boost_1_81_0</strong><strong>\</strong> .................<em>The “boost root directory”</em>
|
||||
<strong>index.htm</strong> .........<em>A copy of www.boost.org starts here</em>
|
||||
<strong>boost</strong><strong>\</strong> .........................<em>All Boost Header files</em>
|
||||
<strong>lib</strong><strong>\</strong> .....................<em>precompiled library binaries</em>
|
||||
@@ -116,7 +116,7 @@ anything you can use in these directories.</p>
|
||||
</div>
|
||||
<p>It's important to note the following:</p>
|
||||
<ol class="arabic" id="boost-root-directory">
|
||||
<li><p class="first">The path to the <strong>boost root directory</strong> (often <tt class="docutils literal"><span class="pre">C:\Program</span> Files\boost\</tt><tt class="docutils literal">boost_1_75_0</tt>) is
|
||||
<li><p class="first">The path to the <strong>boost root directory</strong> (often <tt class="docutils literal"><span class="pre">C:\Program</span> Files\boost\</tt><tt class="docutils literal">boost_1_81_0</tt>) is
|
||||
sometimes referred to as <tt class="docutils literal">$BOOST_ROOT</tt> in documentation and
|
||||
mailing lists .</p>
|
||||
</li>
|
||||
@@ -154,7 +154,7 @@ contains a subset of the Boost documentation. Start with
|
||||
<h1><a class="toc-backref" href="#id30">3 Header-Only Libraries</a></h1>
|
||||
<p>The first thing many people want to know is, “how do I build
|
||||
Boost?” The good news is that often, there's nothing to build.</p>
|
||||
<div class="admonition-nothing-to-build admonition">
|
||||
<div class="admonition admonition-nothing-to-build">
|
||||
<p class="first admonition-title">Nothing to Build?</p>
|
||||
<p class="last">Most Boost libraries are <strong>header-only</strong>: they consist <em>entirely
|
||||
of header files</em> containing templates and inline functions, and
|
||||
@@ -226,7 +226,7 @@ int main()
|
||||
}
|
||||
</pre>
|
||||
<p>Copy the text of this program into a file called <tt class="docutils literal">example.cpp</tt>.</p>
|
||||
<div class="note" id="command-line-tool">
|
||||
<div class="admonition note" id="command-line-tool">
|
||||
<span id="command-prompt"></span><p class="first admonition-title">Note</p>
|
||||
<p class="last">To build the examples in this guide, you can use an
|
||||
Integrated Development Environment (IDE) like Visual Studio, or
|
||||
@@ -254,7 +254,7 @@ cd <em>path</em>\<em>to</em>\<em>some</em>\<em>directory</em>
|
||||
</pre>
|
||||
<p>followed by Return. For example,</p>
|
||||
<pre class="literal-block">
|
||||
cd <tt class="docutils literal"><span class="pre">C:\Program</span> Files\boost\</tt><tt class="docutils literal">boost_1_75_0</tt>
|
||||
cd <tt class="docutils literal"><span class="pre">C:\Program</span> Files\boost\</tt><tt class="docutils literal">boost_1_81_0</tt>
|
||||
</pre>
|
||||
<p class="last">Long commands can be continued across several lines by typing a
|
||||
caret (<tt class="docutils literal">^</tt>) at the end of all but the last line. Some examples
|
||||
@@ -279,7 +279,7 @@ select <em>Properties</em> from the resulting pop-up menu</p>
|
||||
<li><p class="first">In <em>Configuration Properties</em> > <em>C/C++</em> > <em>General</em> > <em>Additional Include
|
||||
Directories</em>, enter the path to the Boost root directory, for example</p>
|
||||
<blockquote>
|
||||
<p><tt class="docutils literal"><span class="pre">C:\Program</span> Files\boost\</tt><tt class="docutils literal">boost_1_75_0</tt></p>
|
||||
<p><tt class="docutils literal"><span class="pre">C:\Program</span> Files\boost\</tt><tt class="docutils literal">boost_1_81_0</tt></p>
|
||||
</blockquote>
|
||||
</li>
|
||||
<li><p class="first">In <em>Configuration Properties</em> > <em>C/C++</em> > <em>Precompiled Headers</em>, change
|
||||
@@ -317,7 +317,7 @@ Visual Studio compiler. In that window, set the <a class="reference internal" h
|
||||
directory</a> to a suitable location for creating some temporary
|
||||
files and type the following command followed by the Return key:</p>
|
||||
<pre class="literal-block">
|
||||
cl /EHsc /I <em>path\to\</em><tt class="docutils literal">boost_1_75_0</tt> <em>path</em>\<em>to</em>\example.cpp
|
||||
cl /EHsc /I <em>path\to\</em><tt class="docutils literal">boost_1_81_0</tt> <em>path</em>\<em>to</em>\example.cpp
|
||||
</pre>
|
||||
<p>To test the result, type:</p>
|
||||
<pre class="literal-block">
|
||||
@@ -356,20 +356,20 @@ bootstrap
|
||||
</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 external" href="http://www.boost.org/build/doc/html/bbv2/overview/invocation.html">Boost.Build documentation</a> for a list
|
||||
libraries. Please consult the <a class="reference external" href="../../tools/build/doc/html/index.html#bbv2.overview.invocation">Boost.Build documentation</a> for a list
|
||||
of allowed options.</p>
|
||||
</div>
|
||||
<div class="section" id="or-build-binaries-from-source">
|
||||
<h2><a class="toc-backref" href="#id37">5.2 Or, Build Binaries From Source</a></h2>
|
||||
<p>If you're using an earlier version of Visual C++, or a compiler
|
||||
from another vendor, you'll need to use <a class="reference external" href="../../tools/build/index.html">Boost.Build</a> to create your
|
||||
from another vendor, you'll need to use <a class="reference external" href="../../tools/build/doc/html/index.html">Boost.Build</a> to create your
|
||||
own binaries.</p>
|
||||
<!-- Copyright David Abrahams 2006. Distributed under the Boost -->
|
||||
<!-- Software License, Version 1.0. (See accompanying -->
|
||||
<!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -->
|
||||
<div class="section" id="install-boost-build">
|
||||
<h3><a class="toc-backref" href="#id38">5.2.1 Install Boost.Build</a></h3>
|
||||
<p><a class="reference external" href="../../tools/build/index.html">Boost.Build</a> is a text-based system for developing, testing, and
|
||||
<p><a class="reference external" href="../../tools/build/doc/html/index.html">Boost.Build</a> is a text-based system for developing, testing, and
|
||||
installing software. First, you'll need to build and
|
||||
install it. To do this:</p>
|
||||
<ol class="arabic simple">
|
||||
@@ -383,12 +383,12 @@ the directory where you want Boost.Build to be installed</li>
|
||||
<div class="section" id="identify-your-toolset">
|
||||
<span id="toolset-name"></span><span id="toolset"></span><h3><a class="toc-backref" href="#id39">5.2.2 Identify Your Toolset</a></h3>
|
||||
<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="https://boostorg.github.io/build/manual/develop/index.html#bbv2.reference.tools">in the
|
||||
following table (an up-to-date list is always available <a class="reference external" href="../../tools/build/doc/html/index.html#bbv2.reference.tools">in the
|
||||
Boost.Build documentation</a>).</p>
|
||||
<div class="note">
|
||||
<div class="admonition note">
|
||||
<p class="first admonition-title">Note</p>
|
||||
<p class="last">If you previously chose a toolset for the purposes of
|
||||
<a class="reference external" href="../../doc/html/bbv2/installation.html">building b2</a>, you should assume it won't work and instead
|
||||
<a class="reference external" href="../../tools/build/doc/html/index.html#bbv2.installation">building b2</a>, you should assume it won't work and instead
|
||||
choose newly from the table below.</p>
|
||||
</div>
|
||||
<table border="1" class="docutils">
|
||||
@@ -415,7 +415,7 @@ Name</th>
|
||||
</tr>
|
||||
<tr><td><tt class="docutils literal">como</tt></td>
|
||||
<td>Comeau Computing</td>
|
||||
<td>Using this toolset may require <a class="reference external" href="../../tools/build/index.html">configuring</a> another
|
||||
<td>Using this toolset may require <a class="reference external" href="../../tools/build/doc/html/index.html">configuring</a> another
|
||||
toolset to act as its backend.</td>
|
||||
</tr>
|
||||
<tr><td><tt class="docutils literal">darwin</tt></td>
|
||||
@@ -469,7 +469,7 @@ detection code) or <a class="reference internal" href="#auto-linking">auto-linki
|
||||
</div>
|
||||
<div class="section" id="select-a-build-directory">
|
||||
<span id="id13"></span><span id="build-directory"></span><h3><a class="toc-backref" href="#id40">5.2.3 Select a Build Directory</a></h3>
|
||||
<p><a class="reference external" href="../../tools/build/index.html">Boost.Build</a> will place all intermediate files it generates while
|
||||
<p><a class="reference external" href="../../tools/build/doc/html/index.html">Boost.Build</a> will place all intermediate files it generates while
|
||||
building into the <strong>build directory</strong>. If your Boost root
|
||||
directory is writable, this step isn't strictly necessary: by
|
||||
default Boost.Build will create a <tt class="docutils literal">bin.v2/</tt> subdirectory for that
|
||||
@@ -483,11 +483,11 @@ invoke <tt class="docutils literal">b2</tt> as follows:</p>
|
||||
b2 <strong>--build-dir=</strong><a class="reference internal" href="#id13"><em>build-directory</em></a> <strong>toolset=</strong><a class="reference internal" href="#toolset-name"><em>toolset-name</em></a> <strong>--build-type=complete</strong> stage
|
||||
</pre>
|
||||
<p>For a complete description of these and other invocation options,
|
||||
please see the <a class="reference external" href="http://www.boost.org/build/doc/html/bbv2/overview/invocation.html">Boost.Build documentation</a>.</p>
|
||||
please see the <a class="reference external" href="../../tools/build/doc/html/index.html#bbv2.overview.invocation">Boost.Build documentation</a>.</p>
|
||||
<p>For example, your session might look like this:<a class="footnote-reference" href="#continuation" id="id15"><sup>3</sup></a></p>
|
||||
<pre class="literal-block">
|
||||
C:\WINDOWS> cd <tt class="docutils literal"><span class="pre">C:\Program</span> Files\boost\</tt><tt class="docutils literal">boost_1_75_0</tt>
|
||||
<tt class="docutils literal"><span class="pre">C:\Program</span> Files\boost\</tt><tt class="docutils literal">boost_1_75_0</tt>> b2 <strong>^</strong>
|
||||
C:\WINDOWS> cd <tt class="docutils literal"><span class="pre">C:\Program</span> Files\boost\</tt><tt class="docutils literal">boost_1_81_0</tt>
|
||||
<tt class="docutils literal"><span class="pre">C:\Program</span> Files\boost\</tt><tt class="docutils literal">boost_1_81_0</tt>> b2 <strong>^</strong>
|
||||
More? <strong>--build-dir=</strong>"C:\Documents and Settings\dave\build-boost" <strong>^</strong>
|
||||
More? <strong>--build-type=complete</strong> <strong>msvc</strong> stage
|
||||
</pre>
|
||||
@@ -495,7 +495,7 @@ More? <strong>--build-type=complete</strong> <strong>msvc</strong> stage
|
||||
<tt class="docutils literal">More?</tt> and quotation marks (<tt class="docutils literal">"</tt>) in that line.</p>
|
||||
<p>The option “<strong>--build-type=complete</strong>” causes Boost.Build to build
|
||||
all supported variants of the libraries. For instructions on how to
|
||||
build only specific variants, please ask on the <a class="reference external" href="http://www.boost.org/more/mailing_lists.htm#jamboost">Boost.Build mailing
|
||||
build only specific variants, please ask on the <a class="reference external" href="http://www.boost.org/more/mailing_lists.htm#users">Boost Users' mailing
|
||||
list</a>.</p>
|
||||
<!-- Copyright David Abrahams 2006. Distributed under the Boost -->
|
||||
<!-- Software License, Version 1.0. (See accompanying -->
|
||||
@@ -504,7 +504,7 @@ list</a>.</p>
|
||||
library binaries in the <tt class="docutils literal">stage</tt><tt class="docutils literal">\</tt><tt class="docutils literal">lib</tt><tt class="docutils literal">\</tt> subdirectory of
|
||||
the Boost tree. To use a different directory pass the
|
||||
<tt class="docutils literal"><span class="pre">--stagedir=</span></tt><em>directory</em> option to <tt class="docutils literal">b2</tt>.</p>
|
||||
<div class="note">
|
||||
<div class="admonition note">
|
||||
<p class="first admonition-title">Note</p>
|
||||
<p class="last"><tt class="docutils literal">b2</tt> is case-sensitive; it is important that all the
|
||||
parts shown in <strong>bold</strong> type above be entirely lower-case.</p>
|
||||
@@ -522,7 +522,7 @@ be interested in:</p>
|
||||
<li>choosing a specific build variant by adding <tt class="docutils literal">release</tt> or
|
||||
<tt class="docutils literal">debug</tt> to the command line.</li>
|
||||
</ul>
|
||||
<div class="note">
|
||||
<div class="admonition note">
|
||||
<p class="first admonition-title">Note</p>
|
||||
<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
|
||||
@@ -564,9 +564,9 @@ packages for libz and libbz2 if you need those features. Other
|
||||
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
|
||||
linker, consider setting up a <tt class="docutils literal"><span class="pre">user-config.jam</span></tt> file as described
|
||||
<a class="reference external" href="http://www.boost.org/build/doc/html/bbv2/overview/configuration.html">here</a>. If that isn't your problem or the <tt class="docutils literal"><span class="pre">user-config.jam</span></tt> file
|
||||
<a class="reference external" href="../../tools/build/doc/html/index.html#bbv2.overview.configuration">here</a>. If that isn't your problem or the <tt class="docutils literal"><span class="pre">user-config.jam</span></tt> file
|
||||
doesn't work for you, please address questions about configuring Boost
|
||||
for your compiler to the <a class="reference external" href="http://www.boost.org/more/mailing_lists.htm#jamboost">Boost.Build mailing list</a>.</p>
|
||||
for your compiler to the <a class="reference external" href="http://www.boost.org/more/mailing_lists.htm#users">Boost Users' mailing list</a>.</p>
|
||||
<span class="target" id="auto-linking"></span><!-- Copyright David Abrahams 2006. Distributed under the Boost -->
|
||||
<!-- Software License, Version 1.0. (See accompanying -->
|
||||
<!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -->
|
||||
@@ -605,7 +605,7 @@ build settings.</li>
|
||||
whose compile configuration is compatible with the rest of your
|
||||
project.</li>
|
||||
</ol>
|
||||
<div class="admonition-auto-linking admonition">
|
||||
<div class="admonition admonition-auto-linking">
|
||||
<p class="first admonition-title">Auto-Linking</p>
|
||||
<p>Most Windows compilers and linkers have so-called “auto-linking
|
||||
support,” which eliminates the second challenge. Special code in
|
||||
@@ -626,7 +626,7 @@ earlier:</p>
|
||||
select <em>Properties</em> from the resulting pop-up menu</li>
|
||||
<li>In <em>Configuration Properties</em> > <em>Linker</em> > <em>Additional Library
|
||||
Directories</em>, enter the path to the Boost binaries,
|
||||
e.g. <tt class="docutils literal"><span class="pre">C:\Program</span> Files\boost\</tt><tt class="docutils literal">boost_1_75_0</tt><tt class="docutils literal">\lib\</tt>.</li>
|
||||
e.g. <tt class="docutils literal"><span class="pre">C:\Program</span> Files\boost\</tt><tt class="docutils literal">boost_1_81_0</tt><tt class="docutils literal">\lib\</tt>.</li>
|
||||
<li>From the <em>Build</em> menu, select <em>Build Solution</em>.</li>
|
||||
</ol>
|
||||
<p><a class="reference internal" href="#test-your-program"><em>skip to the next step</em></a></p>
|
||||
@@ -636,15 +636,15 @@ e.g. <tt class="docutils literal"><span class="pre">C:\Program</span> Files\boos
|
||||
<p>For example, we can compile and link the above program from the
|
||||
Visual C++ command-line by simply adding the <strong>bold</strong> text below to
|
||||
the command line we used earlier, assuming your Boost binaries are
|
||||
in <tt class="docutils literal"><span class="pre">C:\Program</span> Files\boost\</tt><tt class="docutils literal">boost_1_75_0</tt><tt class="docutils literal">\lib</tt>:</p>
|
||||
in <tt class="docutils literal"><span class="pre">C:\Program</span> Files\boost\</tt><tt class="docutils literal">boost_1_81_0</tt><tt class="docutils literal">\lib</tt>:</p>
|
||||
<pre class="literal-block">
|
||||
cl /EHsc /I <em>path\to\</em><tt class="docutils literal">boost_1_75_0</tt> example.cpp <strong>^</strong>
|
||||
<strong>/link /LIBPATH:</strong><strong>C:\Program Files\boost\</strong><strong>boost_1_75_0</strong><strong>\lib</strong>
|
||||
cl /EHsc /I <em>path\to\</em><tt class="docutils literal">boost_1_81_0</tt> example.cpp <strong>^</strong>
|
||||
<strong>/link /LIBPATH:</strong><strong>C:\Program Files\boost\</strong><strong>boost_1_81_0</strong><strong>\lib</strong>
|
||||
</pre>
|
||||
</div>
|
||||
<div class="section" id="library-naming">
|
||||
<h2><a class="toc-backref" href="#id47">6.3 Library Naming</a></h2>
|
||||
<div class="note">
|
||||
<div class="admonition note">
|
||||
<p class="first admonition-title">Note</p>
|
||||
<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>
|
||||
@@ -848,12 +848,11 @@ If you can't find what you need, or there's anything we can do to
|
||||
make this document clearer, please post it to the <a class="reference external" href="http://www.boost.org/more/mailing_lists.htm#users">Boost Users'
|
||||
mailing list</a>.</p>
|
||||
<ul class="simple">
|
||||
<li><a class="reference external" href="../../tools/build/index.html">Boost.Build reference manual</a></li>
|
||||
<li><a class="reference external" href="../../tools/build/doc/html/index.html">Boost.Build reference manual</a></li>
|
||||
<li><a class="reference external" href="http://www.boost.org/more/mailing_lists.htm#users">Boost Users' mailing list</a></li>
|
||||
<li><a class="reference external" href="http://www.boost.org/more/mailing_lists.htm#jamboost">Boost.Build mailing list</a></li>
|
||||
<li><a class="reference external" href="../../libs/index.html">Index of all Boost library documentation</a></li>
|
||||
</ul>
|
||||
<div class="admonition-onward admonition">
|
||||
<div class="admonition admonition-onward">
|
||||
<p class="first admonition-title">Onward</p>
|
||||
<blockquote class="epigraph last">
|
||||
<p>Good luck, and have fun!</p>
|
||||
@@ -865,7 +864,7 @@ mailing list</a>.</p>
|
||||
<colgroup><col class="label" /><col /></colgroup>
|
||||
<tbody valign="top">
|
||||
<tr><td class="label"><a class="fn-backref" href="#id2">[1]</a></td><td>We recommend
|
||||
downloading <a class="reference external" href="http://www.boost.org/users/history/version_1_75_0.html"><tt class="docutils literal">boost_1_75_0</tt><tt class="docutils literal">.7z</tt></a> and using <a class="reference external" href="http://www.7-zip.org">7-Zip</a> to decompress
|
||||
downloading <a class="reference external" href="http://www.boost.org/users/history/version_1_81_0.html"><tt class="docutils literal">boost_1_81_0</tt><tt class="docutils literal">.7z</tt></a> and using <a class="reference external" href="http://www.7-zip.org">7-Zip</a> to decompress
|
||||
it. We no longer recommend .zip files for Boost because they are twice
|
||||
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>
|
||||
|
||||
@@ -183,7 +183,7 @@ command invokes Boost.Build to build the separately-compiled Boost
|
||||
libraries. Please consult the `Boost.Build documentation`__ for a list
|
||||
of allowed options.
|
||||
|
||||
__ http://www.boost.org/build/doc/html/bbv2/overview/invocation.html
|
||||
__ ../../tools/build/doc/html/index.html#bbv2.overview.invocation
|
||||
|
||||
Or, Build Binaries From Source
|
||||
------------------------------
|
||||
@@ -208,7 +208,7 @@ Be sure to read `this note`__ about the appearance of ``^``,
|
||||
|
||||
The option “\ **--build-type=complete**\ ” causes Boost.Build to build
|
||||
all supported variants of the libraries. For instructions on how to
|
||||
build only specific variants, please ask on the `Boost.Build mailing
|
||||
build only specific variants, please ask on the `Boost Users' mailing
|
||||
list`_.
|
||||
|
||||
__ continuation_
|
||||
|
||||
Reference in New Issue
Block a user