From 52260fba70a06f4d3bb465d0d1ddda12b85686c0 Mon Sep 17 00:00:00 2001 From: Dave Abrahams Date: Fri, 10 Apr 2009 20:01:30 +0000 Subject: [PATCH 1/6] fixes #2895 [SVN r52305] --- .../detail/build-from-source-head.rst | 15 ++- .../detail/build-from-source-tail.rst | 8 +- getting_started/unix-variants.html | 108 ++++++++-------- getting_started/unix-variants.rst | 2 +- getting_started/windows.html | 122 +++++++++--------- 5 files changed, 129 insertions(+), 126 deletions(-) diff --git a/getting_started/detail/build-from-source-head.rst b/getting_started/detail/build-from-source-head.rst index f031648..52f5b0e 100644 --- a/getting_started/detail/build-from-source-head.rst +++ b/getting_started/detail/build-from-source-head.rst @@ -39,7 +39,10 @@ Identify Your Toolset ..................... First, find the toolset corresponding to your compiler in the -following table. +following table (an up-to-date list is always available `in the +Boost.Build documentation`__). + +__ http://www.boost.org/boost-build2/doc/html/bbv2/reference/tools.html .. Note:: If you previously chose a toolset for the purposes of `building bjam`_, you should assume it won't work and instead @@ -82,8 +85,6 @@ following table. +-----------+--------------------+-----------------------------+ |``intel`` |Intel | | +-----------+--------------------+-----------------------------+ -|``kylix`` |Borland | | -+-----------+--------------------+-----------------------------+ |``msvc`` |Microsoft | | +-----------+--------------------+-----------------------------+ |``qcc`` |QNX Software Systems| | @@ -126,4 +127,10 @@ invoke ``bjam`` as follows: .. parsed-literal:: - bjam **--build-dir=**\ |build-directory|_ **--toolset=**\ |toolset-name|_ |build-type-complete| stage + bjam **--build-dir=**\ |build-directory|_ **toolset=**\ |toolset-name|_ |build-type-complete| stage + +For a complete description of these and other invocation options, +please see the `Boost.Build documentation`__. + +__ http://www.boost.org/boost-build2/doc/html/bbv2/advanced/invocation.html + diff --git a/getting_started/detail/build-from-source-tail.rst b/getting_started/detail/build-from-source-tail.rst index c8377ad..46d2ff8 100644 --- a/getting_started/detail/build-from-source-tail.rst +++ b/getting_started/detail/build-from-source-tail.rst @@ -65,8 +65,8 @@ __ ../../libs/iostreams/doc/installation.html 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 -in the `Boost.Build documentation`_. 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`_. +`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`_. +__ http://www.boost.org/boost-build2/doc/html/bbv2/advanced/configuration.html diff --git a/getting_started/unix-variants.html b/getting_started/unix-variants.html index 819b6d1..6c181de 100644 --- a/getting_started/unix-variants.html +++ b/getting_started/unix-variants.html @@ -30,36 +30,36 @@

Index

-

1   Get Boost

+

1   Get Boost

The most reliable way to get a copy of Boost is to download a distribution from SourceForge:

    @@ -88,7 +88,7 @@ from -

    2   The Boost Distribution

    +

    2   The Boost Distribution

    This is a sketch of the resulting directory structure:

     boost_1_39_0/ .................The “boost root directory”
    @@ -166,7 +166,7 @@ contains a subset of the Boost documentation.  Start with
     
     
-

3   Header-Only Libraries

+

3   Header-Only Libraries

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.

@@ -206,7 +206,7 @@ use.
-

4   Build a Simple Program Using Boost

+

4   Build a Simple Program Using Boost

To keep things simple, let's start by using a header-only library. The following program reads a sequence of integers from standard input, uses Boost.Lambda to multiply each number by three, and @@ -240,7 +240,7 @@ echo 1 2 3 | ./example

-

4.1   Errors and Warnings

+

4.1   Errors and Warnings

Don't be alarmed if you see compiler warnings originating in Boost headers. We try to eliminate them, but doing so isn't always practical.3 Errors are another matter. If you're @@ -253,11 +253,11 @@ correctly identified the -

5   Prepare to Use a Boost Library Binary

+

5   Prepare to Use a Boost Library Binary

If you want to use any of the separately-compiled Boost libraries, you'll need to acquire library binaries.

-

5.1   Easy Build and Install

+

5.1   Easy Build and Install

Issue the following commands in the shell (don't type $; that represents the shell's prompt):

@@ -285,7 +285,7 @@ path in place of the Boost root directory.

skip to the next step

-

5.2   Or, Build Custom Binaries

+

5.2   Or, Build Custom Binaries

If you're using a compiler other than your system's default, you'll need to use Boost.Build to create binaries. You'll also use this method if you need a nonstandard build variant (see the @@ -298,7 +298,7 @@ installing software. To use it, you'll need an executable called bjam.

-

5.2.1   Get bjam

+

5.2.1   Get bjam

bjam is the command-line tool that drives the Boost Build system. To build Boost binaries, you'll invoke bjam from the Boost root.

@@ -310,9 +310,10 @@ see the list of directories in your PATH, separated by colons, by typing “echo $PATH” at the command prompt.

-

5.2.2   Identify Your Toolset

+

5.2.2   Identify Your Toolset

First, find the toolset corresponding to your compiler in the -following table.

+following table (an up-to-date list is always available in the +Boost.Build documentation).

Note

If you previously chose a toolset for the purposes of @@ -382,10 +383,6 @@ operating system. Intel   -kylix -Borland -  - msvc Microsoft   @@ -412,7 +409,7 @@ a hyphen, e.g. intel-9.0borland-5.4.3.

-

5.2.3   Select a Build Directory

+

5.2.3   Select a Build Directory

Boost.Build will place all intermediate files it generates while building into the build directory. If your Boost root directory is writable, this step isn't strictly necessary: by @@ -420,16 +417,18 @@ default Boost.Build will create a

-

5.2.4   Invoke bjam

+

5.2.4   Invoke bjam

Change your current directory to the Boost root directory and invoke bjam as follows:

-bjam --build-dir=build-directory --toolset=toolset-name   stage
+bjam --build-dir=build-directory toolset=toolset-name   stage
 
+

For a complete description of these and other invocation options, +please see the Boost.Build documentation.

For example, your session might look like this:

 $ cd ~/boost_1_39_0
-$ bjam --build-dir=/tmp/build-boost --toolset=gcc stage
+$ bjam --build-dir=/tmp/build-boost toolset=gcc stage
 

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”.

@@ -466,7 +465,7 @@ file by appending “>build.lo
-

5.3   Expected Build Output

+

5.3   Expected Build Output

During the process of building Boost libraries, you can expect to see some messages printed on the console. These may include

    @@ -490,7 +489,7 @@ look something like:

-

5.4   In Case of Build Errors

+

5.4   In Case of Build Errors

The only error messages you see when building Boost—if any—should be related to the IOStreams library's support of zip and bzip2 formats as described here. Install the relevant development @@ -498,17 +497,16 @@ packages for libz and libbz2 if you need those features. Other errors when building Boost libraries are cause for concern.

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 -in the Boost.Build documentation. 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.

+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.

-

7   Conclusion and Further Resources

+

7   Conclusion and Further Resources

This concludes your introduction to Boost and to integrating it with your programs. As you start using Boost in earnest, there are surely a few additional points you'll wish we had covered. One day @@ -735,7 +733,7 @@ to the -[2]That option is a dash followed by a lowercase “L” +[2]That option is a dash followed by a lowercase “L” character, which looks very much like a numeral 1 in some fonts. @@ -756,7 +754,7 @@ have any source code mechanism for suppressing warnings. - @@ -765,7 +763,7 @@ same name.
[4]This convention distinguishes the static version of +
[4]This convention distinguishes the static version of a Boost library from the import library for an identically-configured Boost DLL, which would otherwise have the same name.
-
[5]These libraries were compiled without optimization +
[5]These libraries were compiled without optimization or inlining, with full debug symbols enabled, and without NDEBUG #defined. Although it's true that sometimes these choices don't affect binary compatibility with other @@ -775,7 +773,7 @@ compiled code, you can't count on that with Boost libraries.
- diff --git a/getting_started/unix-variants.rst b/getting_started/unix-variants.rst index 548343e..ee516fd 100644 --- a/getting_started/unix-variants.rst +++ b/getting_started/unix-variants.rst @@ -140,7 +140,7 @@ For example, your session might look like this: .. parsed-literal:: $ cd ~/|boost_ver| - $ bjam **--build-dir=**\ /tmp/build-boost **--toolset=**\ gcc stage + $ bjam **--build-dir=**\ /tmp/build-boost **toolset=**\ gcc stage 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``”. diff --git a/getting_started/windows.html b/getting_started/windows.html index 4cec250..686b803 100644 --- a/getting_started/windows.html +++ b/getting_started/windows.html @@ -26,40 +26,40 @@ not supported—they may or may not work.

Index

-

1   Get Boost

+

1   Get Boost

The easiest way to get a copy of Boost is to use an installer. The Boost website version of this Getting Started guide will have undated information on installers as they become available, or see @@ -79,7 +79,7 @@ distribution.1

-

2   The Boost Distribution

+

2   The Boost Distribution

This is a sketch of the resulting directory structure:

 boost_1_39_0\ .................The “boost root directory”
@@ -162,7 +162,7 @@ contains a subset of the Boost documentation.  Start with
 
 
-

3   Header-Only Libraries

+

3   Header-Only Libraries

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.

@@ -202,7 +202,7 @@ use.
-

4   Build a Simple Program Using Boost

+

4   Build a Simple Program Using Boost

To keep things simple, let's start by using a header-only library. The following program reads a sequence of integers from standard input, uses Boost.Lambda to multiply each number by three, and @@ -258,7 +258,7 @@ caret (^) at the end on this page use that technique to save horizontal space.

-

4.1   Build From the Visual Studio IDE

+

4.1   Build From the Visual Studio IDE

  • From Visual Studio's File menu, select New > Project…

  • @@ -299,7 +299,7 @@ Return key.

    skip to the next step

-

4.2   Or, Build From the Command Prompt

+

4.2   Or, Build From the Command Prompt

From your computer's Start menu, if you are a Visual Studio 2005 user, select

@@ -325,7 +325,7 @@ echo 1 2 3 | example
-

4.3   Errors and Warnings

+

4.3   Errors and Warnings

Don't be alarmed if you see compiler warnings originating in Boost headers. We try to eliminate them, but doing so isn't always practical.5 Errors are another matter. If you're @@ -338,11 +338,11 @@ correctly identified the -

5   Prepare to Use a Boost Library Binary

+

5   Prepare to Use a Boost Library Binary

If you want to use any of the separately-compiled Boost libraries, you'll need to acquire library binaries.

-

5.1   Install Visual Studio Binaries

+

5.1   Install Visual Studio Binaries

The installers supplied by BoostPro Computing will download and install pre-compiled binaries into the lib\ subdirectory of the boost root, typically C:\Program Files\boost\boost_1_39_0\lib\. If you installed @@ -352,7 +352,7 @@ now.

skip to the next step

-

5.2   Or, Build Binaries From Source

+

5.2   Or, Build Binaries From Source

If you're using an earlier version of Visual C++, or a compiler from another vendor, you'll need to use Boost.Build to create your own binaries.

@@ -364,7 +364,7 @@ installing software. To use it, you'll need an executable called bjam.

-

5.2.1   Get bjam

+

5.2.1   Get bjam

bjam is the command-line tool that drives the Boost Build system. To build Boost binaries, you'll invoke bjam from the Boost root.

@@ -376,9 +376,10 @@ see the list of directories in your PATH, separated by semicolons, by typing “PATH” at the command prompt.

-

5.2.2   Identify Your Toolset

+

5.2.2   Identify Your Toolset

First, find the toolset corresponding to your compiler in the -following table.

+following table (an up-to-date list is always available in the +Boost.Build documentation).

Note

If you previously chose a toolset for the purposes of @@ -448,10 +449,6 @@ operating system.

- - - - @@ -481,7 +478,7 @@ are using the msvc or gcc toolsets, which have special version detection code) or auto-linking will fail.

-

5.2.3   Select a Build Directory

+

5.2.3   Select a Build Directory

Boost.Build will place all intermediate files it generates while building into the build directory. If your Boost root directory is writable, this step isn't strictly necessary: by @@ -489,13 +486,15 @@ default Boost.Build will create a

-

5.2.4   Invoke bjam

+

5.2.4   Invoke bjam

Change your current directory to the Boost root directory and invoke bjam as follows:

-bjam --build-dir=build-directory --toolset=toolset-name --build-type=complete stage
+bjam --build-dir=build-directory toolset=toolset-name --build-type=complete stage
 
-

For example, your session might look like this:4

+

For a complete description of these and other invocation options, +please see the Boost.Build documentation.

+

For example, your session might look like this:4

 C:\WINDOWS> cd C:\Program Files\boost\boost_1_39_0
 C:\Program Files\boost\boost_1_39_0> bjam ^
@@ -542,7 +541,7 @@ file by appending “>build.lo
 
-

5.3   Expected Build Output

+

5.3   Expected Build Output

During the process of building Boost libraries, you can expect to see some messages printed on the console. These may include

    @@ -566,7 +565,7 @@ look something like:

-

5.4   In Case of Build Errors

+

5.4   In Case of Build Errors

The only error messages you see when building Boost—if any—should be related to the IOStreams library's support of zip and bzip2 formats as described here. Install the relevant development @@ -574,17 +573,16 @@ packages for libz and libbz2 if you need those features. Other errors when building Boost libraries are cause for concern.

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 -in the Boost.Build documentation. 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.

+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.

-

6.3   Library Naming

+

6.3   Library Naming

Note

If, like Visual C++, your compiler supports auto-linking, @@ -676,7 +674,7 @@ following elements:

Prefix: except on Microsoft Windows, every Boost library name begins with this string. On Windows, only ordinary static libraries use the lib prefix; import libraries and DLLs do -not.6
+not.6
boost_regex
Library name: all boost library filenames begin with boost_.
-vc71
@@ -714,14 +712,14 @@ libraries.
- + - +
[6]This feature of STLPort is deprecated because it's +
[6]This feature of STLPort is deprecated because it's impossible to make it work transparently to the user; we don't recommend it.
Intel  
kylixBorland 
msvc Microsoft   using a special debug build of Python.
dbuilding a debug version of your code.7building a debug version of your code.7
p using the STLPort standard library rather than the default one supplied with your compiler.
nusing STLPort's deprecated “native iostreams” feature.8using STLPort's deprecated “native iostreams” feature.8
@@ -753,7 +751,7 @@ version number, will also be created.

-

6.4   Test Your Program

+

6.4   Test Your Program

To test our subject extraction, we'll filter the following text file. Copy it out of your browser and save it as jayne.txt:

@@ -775,7 +773,7 @@ Spoil Rock Hunter?”

-

7   Conclusion and Further Resources

+

7   Conclusion and Further Resources

This concludes your introduction to Boost and to integrating it with your programs. As you start using Boost in earnest, there are surely a few additional points you'll wish we had covered. One day @@ -832,7 +830,7 @@ used in the examples. -
[4]

In this example, the caret character ^ is a +

[4]

In this example, the caret character ^ is a way of continuing the command on multiple lines, and must be the final character used on the line to be continued (i.e. do not follow it with spaces). The command prompt responds with @@ -870,7 +868,7 @@ have any source code mechanism for suppressing warnings.

- @@ -879,7 +877,7 @@ same name.
[6]This convention distinguishes the static version of +
[6]This convention distinguishes the static version of a Boost library from the import library for an identically-configured Boost DLL, which would otherwise have the same name.
-
[7]These libraries were compiled without optimization +
[7]These libraries were compiled without optimization or inlining, with full debug symbols enabled, and without NDEBUG #defined. Although it's true that sometimes these choices don't affect binary compatibility with other @@ -889,7 +887,7 @@ compiled code, you can't count on that with Boost libraries.
- From 2c4519ea2580369cc29456f2c4314b2148d4d432 Mon Sep 17 00:00:00 2001 From: Dave Abrahams Date: Fri, 10 Apr 2009 20:08:04 +0000 Subject: [PATCH 2/6] *really* fixes #2895. [SVN r52307] --- getting_started/detail/build-from-source-head.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/getting_started/detail/build-from-source-head.rst b/getting_started/detail/build-from-source-head.rst index 52f5b0e..707a95e 100644 --- a/getting_started/detail/build-from-source-head.rst +++ b/getting_started/detail/build-from-source-head.rst @@ -63,10 +63,10 @@ __ http://www.boost.org/boost-build2/doc/html/bbv2/reference/tools.html | | |require configuring__ another| | | |toolset to act as its backend| +-----------+--------------------+-----------------------------+ -|``cw`` |Metrowerks/FreeScale|The CodeWarrior compiler. We| +|``cw`` |Metrowerks/Freescale|The CodeWarrior compiler. We| | | |have not tested versions of | | | |this compiler produced since | -| | |it was sold to FreeScale. | +| | |it was sold to Freescale. | +-----------+--------------------+-----------------------------+ |``dmc`` |Digital Mars |As of this Boost release, no | | | |version of dmc is known to | From 423be52fb19e2a30c2b1568f31a81e0dd605672a Mon Sep 17 00:00:00 2001 From: Dave Abrahams Date: Fri, 10 Apr 2009 20:08:46 +0000 Subject: [PATCH 3/6] really, really fixes #2895 [SVN r52308] --- getting_started/unix-variants.html | 4 ++-- getting_started/windows.html | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/getting_started/unix-variants.html b/getting_started/unix-variants.html index 6c181de..29bcbeb 100644 --- a/getting_started/unix-variants.html +++ b/getting_started/unix-variants.html @@ -350,11 +350,11 @@ require config toolset to act as its backend - + +it was sold to Freescale. diff --git a/getting_started/windows.html b/getting_started/windows.html index 686b803..4b46a0a 100644 --- a/getting_started/windows.html +++ b/getting_started/windows.html @@ -416,11 +416,11 @@ require config toolset to act as its backend - + +it was sold to Freescale. From 9504364ef5d93f880eff1499bb9a2219815255c6 Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Thu, 16 Apr 2009 05:47:20 +0000 Subject: [PATCH 4/6] Update getting started. - Document bootstrap + bjam - Add Boost.System to the list of compiled libraries - Use "stage/lib" in unix instructions consistenly [SVN r52413] --- .../detail/build-from-source-tail.rst | 2 +- getting_started/detail/header-only.rst | 1 + getting_started/detail/links.rst | 1 + getting_started/index.html | 27 +- getting_started/unix-variants.html | 253 +++++++------- getting_started/unix-variants.rst | 12 +- getting_started/windows.html | 322 +++++++++--------- getting_started/windows.rst | 18 + 8 files changed, 336 insertions(+), 300 deletions(-) diff --git a/getting_started/detail/build-from-source-tail.rst b/getting_started/detail/build-from-source-tail.rst index 46d2ff8..0168c34 100644 --- a/getting_started/detail/build-from-source-tail.rst +++ b/getting_started/detail/build-from-source-tail.rst @@ -3,7 +3,7 @@ .. file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 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`_. .. Note:: ``bjam`` is case-sensitive; it is important that all the diff --git a/getting_started/detail/header-only.rst b/getting_started/detail/header-only.rst index c1f1dd3..d26168e 100644 --- a/getting_started/detail/header-only.rst +++ b/getting_started/detail/header-only.rst @@ -27,6 +27,7 @@ The only Boost libraries that *must* be built separately are: * Boost.Regex_ * Boost.Serialization_ * Boost.Signals_ +* Boost.System_ * Boost.Thread_ * Boost.Wave_ diff --git a/getting_started/detail/links.rst b/getting_started/detail/links.rst index f4a1819..56e6fe9 100644 --- a/getting_started/detail/links.rst +++ b/getting_started/detail/links.rst @@ -11,6 +11,7 @@ .. _Boost.Regex: ../../libs/regex/index.html .. _Boost.Serialization: ../../libs/serialization/index.html .. _Boost.Signals: ../../libs/signals/index.html +.. _Boost.System: ../../libs/system/index.html .. _Boost.Test: ../../libs/test/index.html .. _Boost.Thread: ../../doc/html/thread.html .. _Boost.Wave: ../../libs/wave/index.html diff --git a/getting_started/index.html b/getting_started/index.html index 86a98dd..d1b1cfe 100644 --- a/getting_started/index.html +++ b/getting_started/index.html @@ -3,32 +3,31 @@ - + Boost Getting Started
-

Getting Started

- +

Getting Started

Use the latest version of this Getting Started guide

-

The Boost website version of this Getting Started guide may +

The Boost website version of this Getting Started guide may have undated information, such as the location of additional installers or improved installation procedures, so you might want use that version if you've got an Internet connection available.

-
-

Welcome

+
+

Welcome

Welcome to the Boost libraries! By the time you've completed this tutorial, you'll be at least somewhat comfortable with the contents of a Boost distribution and how to go about using it.

-
-

What's Here

+
+

What's Here

This document is designed to be an extremely gentle introduction, 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 @@ -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 help you pursue these topics further.

-
-

Preliminaries

+
+

Preliminaries

We use one typographic convention that might not be immediately obvious: italic text in examples is meant as a descriptive placeholder for something else, usually information that you'll @@ -48,16 +47,16 @@ provide. For example:

Here you're expected to imagine replacing the text “your name” with your actual name.

-
-

Ready?

+
+

Ready?

Let's go!

diff --git a/getting_started/unix-variants.html b/getting_started/unix-variants.html index 29bcbeb..2baff48 100644 --- a/getting_started/unix-variants.html +++ b/getting_started/unix-variants.html @@ -3,15 +3,14 @@ - + Boost Getting Started on Unix Variants
-

Getting Started on Unix Variants

- +

Getting Started on Unix Variants

@@ -27,43 +26,43 @@ .. _`Getting Started on Windows`: windows.html .. _Cygwin: http://www.cygwin.com .. _MinGW: http://mingw.org --> -
-

Index

+ -
-

1   Get Boost

+
+

1   Get Boost

The most reliable way to get a copy of Boost is to download a -distribution from SourceForge:

+distribution from SourceForge:

    -
  1. Download boost_1_39_0.tar.bz2.

    +
  2. Download boost_1_39_0.tar.bz2.

  3. In the directory where you want to put the Boost installation, execute

    @@ -79,16 +78,16 @@ library packages, however you may need to adapt these instructions if you use third-party packages, because their creators usually choose to break Boost up into several packages, reorganize the directory structure of the Boost distribution, -and/or rename the library binaries.1 If you have +and/or rename the library binaries.1 If you have any trouble, we suggest using an official Boost distribution -from SourceForge.

    +from SourceForge.

-
-

2   The Boost Distribution

+
+

2   The Boost Distribution

This is a sketch of the resulting directory structure:

 boost_1_39_0/ .................The “boost root directory”
@@ -123,7 +122,7 @@ the Python library's def.hpp
 
  • Some libraries have an “aggregate header” in boost/ that #includes all of the library's other headers. For -example, Boost.Python's aggregate header is

    +example, Boost.Python's aggregate header is

     boost/python.hpp.
     
    @@ -165,8 +164,8 @@ contains a subset of the Boost documentation. Start with
  • -
    -

    3   Header-Only Libraries

    +
    +

    3   Header-Only Libraries

    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.

    @@ -179,25 +178,26 @@ treatment when linking.

    The only Boost libraries that must be built separately are:

    A few libraries have optional separately-compiled binaries:

      -
    • Boost.DateTime has a binary component that is only needed if +
    • Boost.DateTime has a binary component that is only needed if you're using its to_string/from_string or serialization features, or if you're targeting Visual C++ 6.x or Borland.
    • -
    • Boost.Graph also has a binary component that is only needed if -you intend to parse GraphViz files.
    • -
    • Boost.Test can be used in “header-only” or “separately compiled” +
    • Boost.Graph also has a binary component that is only needed if +you intend to parse GraphViz files.
    • +
    • Boost.Test can be used in “header-only” or “separately compiled” mode, although separate compilation is recommended for serious use.
    @@ -205,8 +205,8 @@ use.
    -
    -

    4   Build a Simple Program Using Boost

    +
    +

    4   Build a Simple Program Using Boost

    To keep things simple, let's start by using a header-only library. The following program reads a sequence of integers from standard input, uses Boost.Lambda to multiply each number by three, and @@ -239,85 +239,85 @@ echo 1 2 3 | ./example -

    -

    4.1   Errors and Warnings

    +
    +

    4.1   Errors and Warnings

    Don't be alarmed if you see compiler warnings originating in Boost headers. We try to eliminate them, but doing so isn't always -practical.3 Errors are another matter. If you're +practical.3 Errors are another matter. If you're seeing compilation errors at this point in the tutorial, check to -be sure you've copied the example program correctly and that you've -correctly identified the Boost root directory.

    +be sure you've copied the example program correctly and that you've +correctly identified the Boost root directory.

    -
    -

    5   Prepare to Use a Boost Library Binary

    +
    +

    5   Prepare to Use a Boost Library Binary

    If you want to use any of the separately-compiled Boost libraries, you'll need to acquire library binaries.

    -
    -

    5.1   Easy Build and Install

    +
    +

    5.1   Easy Build and Install

    Issue the following commands in the shell (don't type $; that represents the shell's prompt):

     $ cd path/to/boost_1_39_0
    -$ ./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 your system's /usr/local/ directory, you'll probably want to at least use

    -$ ./configure --prefix=path/to/installation/prefix
    +$ ./bootstrap.sh --prefix=path/to/installation/prefix
     

    to install somewhere else. Also, consider using the --show-libraries and --with-libraries= options to limit the long wait you'll experience if you build everything. Finally,

    -$ make install
    +$ ./bjam install
     

    will leave Boost binaries in the lib/ subdirectory of your installation prefix. You will also find a copy of the Boost headers in the include/ subdirectory of the installation prefix, so you can henceforth use that directory as an #include path in place of the Boost root directory.

    -

    skip to the next step

    +

    skip to the next step

    -
    -

    5.2   Or, Build Custom Binaries

    +
    +

    5.2   Or, Build Custom Binaries

    If you're using a compiler other than your system's default, you'll -need to use Boost.Build to create binaries. You'll also +need to use Boost.Build to create binaries. You'll also use this method if you need a nonstandard build variant (see the -Boost.Build documentation for more details).

    +Boost.Build documentation for more details).

    -

    Boost.Build is a text-based system for developing, testing, and +

    Boost.Build is a text-based system for developing, testing, and installing software. To use it, you'll need an executable called bjam.

    -
    -

    5.2.1   Get bjam

    +
    +

    5.2.1   Get bjam

    bjam is the command-line tool that drives the Boost Build system. To build Boost binaries, you'll invoke bjam from the Boost root.

    -

    We suggest you download a pre-built bjam executable for your platform. -Alternatively, you can build bjam yourself using these +

    We suggest you download a pre-built bjam executable for your platform. +Alternatively, you can build bjam yourself using these instructions.

    Move the bjam executable into a directory in your PATH. You can see the list of directories in your PATH, separated by colons, by typing “echo $PATH” at the command prompt.

    -
    -

    5.2.2   Identify Your Toolset

    +
    +

    5.2.2   Identify Your Toolset

    First, find the toolset corresponding to your compiler in the -following table (an up-to-date list is always available in the +following table (an up-to-date list is always available in the Boost.Build documentation).

    Note

    If you previously chose a toolset for the purposes of -building bjam, you should assume it won't work and instead +building bjam, you should assume it won't work and instead choose newly from the table below.

    [8]This feature of STLPort is deprecated because it's +
    [8]This feature of STLPort is deprecated because it's impossible to make it work transparently to the user; we don't recommend it.
    cwMetrowerks/FreeScaleMetrowerks/Freescale The CodeWarrior compiler. We have not tested versions of this compiler produced since -it was sold to FreeScale.
    dmc Digital Mars
    cwMetrowerks/FreeScaleMetrowerks/Freescale The CodeWarrior compiler. We have not tested versions of this compiler produced since -it was sold to FreeScale.
    dmc Digital Mars
    @@ -346,7 +346,7 @@ known to work well with Boost @@ -408,34 +408,34 @@ you can append the version number to the toolset name, preceded by a hyphen, e.g. intel-9.0 or borland-5.4.3.

    -
    -

    5.2.3   Select a Build Directory

    -

    Boost.Build will place all intermediate files it generates while +

    +

    5.2.3   Select a Build Directory

    +

    Boost.Build will place all intermediate files it generates while building into the build directory. If your Boost root directory is writable, this step isn't strictly necessary: by default Boost.Build will create a bin.v2/ subdirectory for that purpose in your current working directory.

    -
    -

    5.2.4   Invoke bjam

    +
    +

    5.2.4   Invoke bjam

    Change your current directory to the Boost root directory and invoke bjam as follows:

    -bjam --build-dir=build-directory toolset=toolset-name   stage
    +bjam --build-dir=build-directory toolset=toolset-name   stage
     

    For a complete description of these and other invocation options, -please see the Boost.Build documentation.

    +please see the Boost.Build documentation.

    For example, your session might look like this:

     $ cd ~/boost_1_39_0
     $ bjam --build-dir=/tmp/build-boost toolset=gcc stage
     
    -

    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”.

    +

    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``”.

    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.

    Note

    @@ -460,12 +460,12 @@ be interested in:

    Boost.Build can produce a great deal of output, which can make it easy to miss problems. If you want to make sure everything is went well, you might redirect the output into a -file by appending “>build.log 2>&1” to your command line.

    +file by appending “``>build.log 2>&1``” to your command line.

    -
    -

    5.3   Expected Build Output

    +
    +

    5.3   Expected Build Output

    During the process of building Boost libraries, you can expect to see some messages printed on the console. These may include

      @@ -488,28 +488,28 @@ look something like:

    -
    -

    5.4   In Case of Build Errors

    +
    +

    5.4   In Case of Build Errors

    The only error messages you see when building Boost—if any—should be related to the IOStreams library's support of zip and bzip2 -formats as described here. Install the relevant development +formats as described here. Install the relevant development packages for libz and libbz2 if you need those features. Other errors when building Boost libraries are cause for concern.

    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 +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.Build mailing list.

    -
    - + - + - +
    como Comeau Computing Using this toolset may -require configuring another +require configuring another toolset to act as its backend
    cwusing debug versions of the standard and runtime support libraries.
    yusing a special debug build of Python.using a special debug build of Python.
    dbuilding a debug version of your code.5building a debug version of your code.5
    p using the STLPort standard library rather than the default one supplied with your compiler.
    nusing STLPort's deprecated “native iostreams” feature.6using STLPort's deprecated “native iostreams” feature.6
    @@ -655,8 +655,8 @@ version number, will also be created.

    -
    -

    6.2   Test Your Program

    +
    +

    6.2   Test Your Program

    To test our subject extraction, we'll filter the following text file. Copy it out of your browser and save it as jayne.txt:

    @@ -695,23 +695,23 @@ Spoil Rock Hunter?”

    -
    -

    7   Conclusion and Further Resources

    +
    +

    7   Conclusion and Further Resources

    This concludes your introduction to Boost and to integrating it with your programs. As you start using Boost in earnest, there are surely a few additional points you'll wish we had covered. One day we may have a “Book 2 in the Getting Started series” that addresses 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 -make this document clearer, please post it to the Boost Users' +make this document clearer, please post it to the Boost Users' mailing list.

    Onward

    @@ -724,16 +724,17 @@ mailing list.

    - +to the Boost developers' list.

    +
    [1]If developers of Boost packages would like to work +
    [1]

    If developers of Boost packages would like to work with us to make sure these instructions can be used with their packages, we'd be glad to help. Please make your interest known -to the Boost developers' list.

    -
    [2]That option is a dash followed by a lowercase “L” +
    [2]That option is a dash followed by a lowercase “L” character, which looks very much like a numeral 1 in some fonts.
    @@ -743,7 +744,7 @@ character, which looks very much like a numeral 1 in some fonts. -
    [3]Remember that warnings are specific to each compiler +
    [3]Remember that warnings are specific to each compiler implementation. The developer of a given Boost library might not have access to your compiler. Also, some warnings are extremely difficult to eliminate in generic code, to the point @@ -754,7 +755,7 @@ have any source code mechanism for suppressing warnings.
    - @@ -763,7 +764,7 @@ same name.
    [4]This convention distinguishes the static version of +
    [4]This convention distinguishes the static version of a Boost library from the import library for an identically-configured Boost DLL, which would otherwise have the same name.
    -
    [5]These libraries were compiled without optimization +
    [5]These libraries were compiled without optimization or inlining, with full debug symbols enabled, and without NDEBUG #defined. Although it's true that sometimes these choices don't affect binary compatibility with other @@ -773,7 +774,7 @@ compiled code, you can't count on that with Boost libraries.
    - diff --git a/getting_started/unix-variants.rst b/getting_started/unix-variants.rst index ee516fd..1444cb9 100644 --- a/getting_started/unix-variants.rst +++ b/getting_started/unix-variants.rst @@ -96,16 +96,16 @@ represents the shell's prompt): .. parsed-literal:: **$** 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 your system's ``/usr/local/`` directory, you'll probably want to at least use .. parsed-literal:: - **$** ./configure **--prefix=**\ *path*\ /\ *to*\ /\ *installation*\ /\ *prefix* + **$** ./bootstrap.sh **--prefix=**\ *path*\ /\ *to*\ /\ *installation*\ /\ *prefix* to install somewhere else. Also, consider using 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:: - **$** make install + **$** ./bjam install will leave Boost binaries in the ``lib/`` subdirectory of your 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:: $ 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``\ *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:: $ 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 library; it *really* pays off when you're using multiple diff --git a/getting_started/windows.html b/getting_started/windows.html index 4b46a0a..9087dcc 100644 --- a/getting_started/windows.html +++ b/getting_started/windows.html @@ -3,83 +3,83 @@ - +Boost Getting Started on Windows
    -

    Getting Started on Windows

    - +

    Getting Started on Windows

    -

    A note to Cygwin and MinGW users

    +

    A note to Cygwin and MinGW users

    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 Cygwin +you're in the right place. If you plan to build from the Cygwin bash shell, you're actually running on a POSIX platform and -should follow the instructions for getting started on Unix -variants. Other command shells, such as MinGW's MSYS, are +should follow the instructions for getting started on Unix +variants. Other command shells, such as MinGW's MSYS, are not supported—they may or may not work.

    -
    -

    Index

    +
    +

    Index

    -
    -

    1   Get Boost

    +
    +

    1   Get Boost

    The easiest way to get a copy of Boost is to use an installer. The -Boost website version of this Getting Started guide will have +Boost website version of this Getting Started guide will have undated information on installers as they become available, or see -Boost downloads or the installer provided by BoostPro +Boost downloads or the installer provided by BoostPro Computing. We especially recommend using an installer if you use Microsoft Visual Studio, because the installer can download and install precompiled library binaries, saving you the trouble of building them yourself. To complete this tutorial, you'll need to at -least install the Static Multithreaded variants of the Boost.Regex +least install the Static Multithreaded variants of the Boost.Regex binaries when given the option.

    If you're using an earlier version of Visual Studio or some other compiler, or if you prefer to build everything yourself, you can -download boost_1_39_0.7z or boost_1_39_0.zip and unpack it to install a complete Boost -distribution.1

    +download boost_1_39_0.7z or boost_1_39_0.zip and unpack it to install a complete Boost +distribution.1

    -
    -

    2   The Boost Distribution

    +
    +

    2   The Boost Distribution

    This is a sketch of the resulting directory structure:

     boost_1_39_0\ .................The “boost root directory”
    @@ -114,7 +114,7 @@ the Python library's def.hpp
     
  • Some libraries have an “aggregate header” in boost\ that #includes all of the library's other headers. For -example, Boost.Python's aggregate header is

    +example, Boost.Python's aggregate header is

     boost\python.hpp.
     
    @@ -161,8 +161,8 @@ contains a subset of the Boost documentation. Start with
  • -
    -

    3   Header-Only Libraries

    +
    +

    3   Header-Only Libraries

    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.

    @@ -175,25 +175,26 @@ treatment when linking.

    The only Boost libraries that must be built separately are:

    A few libraries have optional separately-compiled binaries:

      -
    • Boost.DateTime has a binary component that is only needed if +
    • Boost.DateTime has a binary component that is only needed if you're using its to_string/from_string or serialization features, or if you're targeting Visual C++ 6.x or Borland.
    • -
    • Boost.Graph also has a binary component that is only needed if -you intend to parse GraphViz files.
    • -
    • Boost.Test can be used in “header-only” or “separately compiled” +
    • Boost.Graph also has a binary component that is only needed if +you intend to parse GraphViz files.
    • +
    • Boost.Test can be used in “header-only” or “separately compiled” mode, although separate compilation is recommended for serious use.
    @@ -201,8 +202,8 @@ use.
    -
    -

    4   Build a Simple Program Using Boost

    +
    +

    4   Build a Simple Program Using Boost

    To keep things simple, let's start by using a header-only library. The following program reads a sequence of integers from standard input, uses Boost.Lambda to multiply each number by three, and @@ -223,11 +224,11 @@ int main() }

    Copy the text of this program into a file called example.cpp.

    -
    -

    Note

    +
    +

    Note

    To build the examples in this guide, you can use an Integrated Development Environment (IDE) like Visual Studio, or -you can issue commands from the command prompt. Since every +you can issue commands from the command prompt. Since every IDE and compiler has different options and Microsoft's are by far the dominant compilers on Windows, we only give specific directions here for Visual Studio 2005 and .NET 2003 IDEs and @@ -257,8 +258,8 @@ cd C:\Program ^) at the end of all but the last line. Some examples on this page use that technique to save horizontal space.

    -
    -

    4.1   Build From the Visual Studio IDE

    +
    +

    4.1   Build From the Visual Studio IDE

    • From Visual Studio's File menu, select New > Project…

    • @@ -281,7 +282,7 @@ Directories, enter the path to the Boost root directory, for example

    • In Configuration Properties > C/C++ > Precompiled Headers, change Use Precompiled Header (/Yu) to Not Using Precompiled -Headers.3

      +Headers.3

    • Replace the contents of the example.cpp generated by the IDE with the example code above.

      @@ -296,10 +297,10 @@ into the resulting window, followed by the Return key:

      Then hold down the control key and press "Z", followed by the Return key.

      -

      skip to the next step

      +

      skip to the next step

    -
    -

    4.2   Or, Build From the Command Prompt

    +
    +

    4.2   Or, Build From the Command Prompt

    From your computer's Start menu, if you are a Visual Studio 2005 user, select

    @@ -309,8 +310,8 @@ Studio 2005 user, select

    All Programs > Microsoft Visual Studio .NET 2003 > Visual Studio .NET Tools > Visual Studio .NET 2003 Command Prompt
    -

    to bring up a special command prompt window set up for the -Visual Studio compiler. In that window, set the current +

    to bring up a special command prompt window set up for the +Visual Studio compiler. In that window, set the current directory to a suitable location for creating some temporary files and type the following command followed by the Return key:

    @@ -324,66 +325,81 @@ echo 1 2 3 | example
     
     
     
    -
    -

    4.3   Errors and Warnings

    +
    +

    4.3   Errors and Warnings

    Don't be alarmed if you see compiler warnings originating in Boost headers. We try to eliminate them, but doing so isn't always -practical.5 Errors are another matter. If you're +practical.5 Errors are another matter. If you're seeing compilation errors at this point in the tutorial, check to -be sure you've copied the example program correctly and that you've -correctly identified the Boost root directory.

    +be sure you've copied the example program correctly and that you've +correctly identified the Boost root directory.

    -
    -

    5   Prepare to Use a Boost Library Binary

    +
    +

    5   Prepare to Use a Boost Library Binary

    If you want to use any of the separately-compiled Boost libraries, you'll need to acquire library binaries.

    -
    -

    5.1   Install Visual Studio Binaries

    +
    +

    5.1   Install Visual Studio Binaries

    The installers supplied by BoostPro Computing will download and install pre-compiled binaries into the lib\ subdirectory of the boost root, typically C:\Program Files\boost\boost_1_39_0\lib\. If you installed -all variants of the Boost.Regex binary, you're done with this +all variants of the Boost.Regex binary, you're done with this step. Otherwise, please run the installer again and install them now.

    -

    skip to the next step

    +

    skip to the next step

    -
    -

    5.2   Or, Build Binaries From Source

    +
    +

    5.2   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.

    +
    +
    +

    5.3   Or, Build Binaries From Source

    If you're using an earlier version of Visual C++, or a compiler -from another vendor, you'll need to use Boost.Build to create your +from another vendor, you'll need to use Boost.Build to create your own binaries.

    -

    Boost.Build is a text-based system for developing, testing, and +

    Boost.Build is a text-based system for developing, testing, and installing software. To use it, you'll need an executable called bjam.

    -
    -

    5.2.1   Get bjam

    -

    bjam is the command-line tool that drives the Boost Build +

    +

    5.3.1   Get bjam

    +

    bjam is the command-line tool that drives the Boost Build system. To build Boost binaries, you'll invoke bjam from the Boost root.

    -

    We suggest you download a pre-built bjam executable for your platform. -Alternatively, you can build bjam yourself using these +

    We suggest you download a pre-built bjam executable for your platform. +Alternatively, you can build bjam yourself using these instructions.

    Move the bjam executable into a directory in your PATH. You can see the list of directories in your PATH, separated by semicolons, by typing “PATH” at the command prompt.

    -
    -

    5.2.2   Identify Your Toolset

    +
    +

    5.3.2   Identify Your Toolset

    First, find the toolset corresponding to your compiler in the -following table (an up-to-date list is always available in the +following table (an up-to-date list is always available in the Boost.Build documentation).

    Note

    If you previously chose a toolset for the purposes of -building bjam, you should assume it won't work and instead +building bjam, you should assume it won't work and instead choose newly from the table below.

    [6]This feature of STLPort is deprecated because it's +
    [6]This feature of STLPort is deprecated because it's impossible to make it work transparently to the user; we don't recommend it.
    @@ -412,7 +428,7 @@ known to work well with Boost @@ -475,43 +491,43 @@ a hyphen, e.g. intel-9.0borland-5.4.3. On Windows, append a version number even if you only have one version installed (unless you are using the msvc or gcc toolsets, which have special version -detection code) or auto-linking will fail.

    +detection code) or auto-linking will fail.

    -
    -

    5.2.3   Select a Build Directory

    -

    Boost.Build will place all intermediate files it generates while +

    +

    5.3.3   Select a Build Directory

    +

    Boost.Build will place all intermediate files it generates while building into the build directory. If your Boost root directory is writable, this step isn't strictly necessary: by default Boost.Build will create a bin.v2/ subdirectory for that purpose in your current working directory.

    -
    -

    5.2.4   Invoke bjam

    +
    +

    5.3.4   Invoke bjam

    Change your current directory to the Boost root directory and invoke bjam as follows:

    -bjam --build-dir=build-directory toolset=toolset-name --build-type=complete stage
    +bjam --build-dir=build-directory toolset=toolset-name --build-type=complete stage
     

    For a complete description of these and other invocation options, -please see the Boost.Build documentation.

    -

    For example, your session might look like this:4

    +please see the Boost.Build documentation.

    +

    For example, your session might look like this:4

     C:\WINDOWS> cd C:\Program Files\boost\boost_1_39_0
     C:\Program Files\boost\boost_1_39_0> bjam ^
     More? --build-dir="C:\Documents and Settings\dave\build-boost" ^
     More? --build-type=complete msvc stage
     
    -

    Be sure to read this note about the appearance of ^, +

    Be sure to read this note about the appearance of ^, More? and quotation marks (") in that line.

    The option “--build-type=complete” causes bjam 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.Build mailing list.

    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.

    Note

    @@ -536,12 +552,12 @@ be interested in:

    Boost.Build can produce a great deal of output, which can make it easy to miss problems. If you want to make sure everything is went well, you might redirect the output into a -file by appending “>build.log 2>&1” to your command line.

    +file by appending “``>build.log 2>&1``” to your command line.

    -
    -

    5.3   Expected Build Output

    +
    +

    5.4   Expected Build Output

    During the process of building Boost libraries, you can expect to see some messages printed on the console. These may include

      @@ -564,28 +580,28 @@ look something like:

    -
    -

    5.4   In Case of Build Errors

    +
    +

    5.5   In Case of Build Errors

    The only error messages you see when building Boost—if any—should be related to the IOStreams library's support of zip and bzip2 -formats as described here. Install the relevant development +formats as described here. Install the relevant development packages for libz and libbz2 if you need those features. Other errors when building Boost libraries are cause for concern.

    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 +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.Build mailing list.

    -
    - + - + - +
    como Comeau Computing Using this toolset may -require configuring another +require configuring another toolset to act as its backend
    cwusing debug versions of the standard and runtime support libraries.
    yusing a special debug build of Python.using a special debug build of Python.
    dbuilding a debug version of your code.7building a debug version of your code.7
    p using the STLPort standard library rather than the default one supplied with your compiler.
    nusing STLPort's deprecated “native iostreams” feature.8using STLPort's deprecated “native iostreams” feature.8
    @@ -750,8 +766,8 @@ version number, will also be created.
    -
    -

    6.4   Test Your Program

    +
    +

    6.4   Test Your Program

    To test our subject extraction, we'll filter the following text file. Copy it out of your browser and save it as jayne.txt:

    @@ -761,7 +777,7 @@ Subject: Will Success Spoil Rock Hunter?
     ---
     See subject.
     
    -

    Now, in a command prompt window, type:

    +

    Now, in a command prompt window, type:

     path\to\compiled\example < path\to\jayne.txt
     
    @@ -772,23 +788,23 @@ Spoil Rock Hunter?”

    -
    -

    7   Conclusion and Further Resources

    +
    +

    7   Conclusion and Further Resources

    This concludes your introduction to Boost and to integrating it with your programs. As you start using Boost in earnest, there are surely a few additional points you'll wish we had covered. One day we may have a “Book 2 in the Getting Started series” that addresses 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 -make this document clearer, please post it to the Boost Users' +make this document clearer, please post it to the Boost Users' mailing list.

    Onward

    @@ -801,8 +817,8 @@ mailing list.

    - @@ -811,7 +827,7 @@ built-in decompression as it can be painfully slow for large archives.
    [1]We recommend -downloading boost_1_39_0.7z and using 7-Zip to decompress +
    [1]We recommend +downloading boost_1_39_0.7z and using 7-Zip to decompress it. We no longer recommend .zip files for Boost because they are twice as large as the equivalent .7z files. We don't recommend using Windows' built-in decompression as it can be painfully slow for large archives.
    -
    [2]If you used the installer from Boost +
    [2]If you used the installer from Boost Consulting and deselected “Source and Documentation” (it's selected by default), you won't see the libs/ subdirectory. 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.
    - @@ -830,7 +846,7 @@ used in the examples.
    [3]There's no problem using Boost with precompiled headers; +
    [3]There's no problem using Boost with precompiled headers; these instructions merely avoid precompiled headers because it would require Visual Studio-specific changes to the source code used in the examples.
    -
    [4]

    In this example, the caret character ^ is a +

    [4]

    In this example, the caret character ^ is a way of continuing the command on multiple lines, and must be the final character used on the line to be continued (i.e. do not follow it with spaces). The command prompt responds with @@ -857,7 +873,7 @@ command-line argument contains spaces, as in

    -
    [5]Remember that warnings are specific to each compiler +
    [5]Remember that warnings are specific to each compiler implementation. The developer of a given Boost library might not have access to your compiler. Also, some warnings are extremely difficult to eliminate in generic code, to the point @@ -868,7 +884,7 @@ have any source code mechanism for suppressing warnings.
    - @@ -877,7 +893,7 @@ same name.
    [6]This convention distinguishes the static version of +
    [6]This convention distinguishes the static version of a Boost library from the import library for an identically-configured Boost DLL, which would otherwise have the same name.
    -
    [7]These libraries were compiled without optimization +
    [7]These libraries were compiled without optimization or inlining, with full debug symbols enabled, and without NDEBUG #defined. Although it's true that sometimes these choices don't affect binary compatibility with other @@ -887,7 +903,7 @@ compiled code, you can't count on that with Boost libraries.
    - diff --git a/getting_started/windows.rst b/getting_started/windows.rst index c781030..50dc4a5 100644 --- a/getting_started/windows.rst +++ b/getting_started/windows.rst @@ -199,6 +199,24 @@ now. __ `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 ------------------------------ From 7cdf7be9ceb20576fb17f483dbdc5b459694a087 Mon Sep 17 00:00:00 2001 From: Beman Dawes Date: Mon, 11 May 2009 00:59:37 +0000 Subject: [PATCH 5/6] Prep for 1.40.0 [SVN r52887] --- getting_started/detail/release-variables.rst | 6 +- getting_started/unix-variants.html | 258 +++++++------- getting_started/windows.html | 339 ++++++++++--------- 3 files changed, 302 insertions(+), 301 deletions(-) diff --git a/getting_started/detail/release-variables.rst b/getting_started/detail/release-variables.rst index 3f7fe8f..f14f5d4 100644 --- a/getting_started/detail/release-variables.rst +++ b/getting_started/detail/release-variables.rst @@ -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:: 1.39.0 -.. |boost_ver| replace:: ``boost_1_39_0`` -.. |boost_ver-bold| replace:: **boost_1_39_0** +.. |boost-version-number| replace:: 1.40.0 +.. |boost_ver| replace:: ``boost_1_40_0`` +.. |boost_ver-bold| replace:: **boost_1_40_0** .. _sf-download: http://sourceforge.net/project/showfiles.php?group_id=7586&package_id=8041 diff --git a/getting_started/unix-variants.html b/getting_started/unix-variants.html index 2baff48..42086e6 100644 --- a/getting_started/unix-variants.html +++ b/getting_started/unix-variants.html @@ -3,14 +3,15 @@ - + Boost Getting Started on Unix Variants
    -

    Getting Started on Unix Variants

    +

    Getting Started on Unix Variants

    + @@ -26,48 +27,48 @@ .. _`Getting Started on Windows`: windows.html .. _Cygwin: http://www.cygwin.com .. _MinGW: http://mingw.org --> -
    -

    Index

    + -
    -

    1   Get Boost

    +
    +

    1   Get Boost

    The most reliable way to get a copy of Boost is to download a -distribution from SourceForge:

    +distribution from SourceForge:

      -
    1. Download boost_1_39_0.tar.bz2.

      +
    2. Download boost_1_40_0.tar.bz2.

    3. In the directory where you want to put the Boost installation, execute

      -tar --bzip2 -xf /path/to/boost_1_39_0.tar.bz2
      +tar --bzip2 -xf /path/to/boost_1_40_0.tar.bz2
       
    @@ -78,19 +79,19 @@ library packages, however you may need to adapt these instructions if you use third-party packages, because their creators usually choose to break Boost up into several packages, reorganize the directory structure of the Boost distribution, -and/or rename the library binaries.1 If you have +and/or rename the library binaries.1 If you have any trouble, we suggest using an official Boost distribution -from SourceForge.

    +from SourceForge.

    -
    -

    2   The Boost Distribution

    +
    +

    2   The Boost Distribution

    This is a sketch of the resulting directory structure:

    -boost_1_39_0/ .................The “boost root directory”
    +boost_1_40_0/ .................The “boost root directory”
        index.htm .........A copy of www.boost.org starts here
        boost/ .........................All Boost Header files
         
    @@ -122,7 +123,7 @@ the Python library's def.hpp
     
  • Some libraries have an “aggregate header” in boost/ that #includes all of the library's other headers. For -example, Boost.Python's aggregate header is

    +example, Boost.Python's aggregate header is

     boost/python.hpp.
     
    @@ -135,7 +136,7 @@ anything you can use in these directories.

  • It's important to note the following:

      -
    1. The path to the boost root directory (often /usr/local/boost_1_39_0) is +

    2. The path to the boost root directory (often /usr/local/boost_1_40_0) is sometimes referred to as $BOOST_ROOT in documentation and mailing lists .

    3. @@ -164,8 +165,8 @@ contains a subset of the Boost documentation. Start with
    -
    -

    3   Header-Only Libraries

    +
    +

    3   Header-Only Libraries

    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.

    @@ -178,26 +179,26 @@ treatment when linking.

    The only Boost libraries that must be built separately are:

    A few libraries have optional separately-compiled binaries:

      -
    • Boost.DateTime has a binary component that is only needed if +
    • Boost.DateTime has a binary component that is only needed if you're using its to_string/from_string or serialization features, or if you're targeting Visual C++ 6.x or Borland.
    • -
    • Boost.Graph also has a binary component that is only needed if -you intend to parse GraphViz files.
    • -
    • Boost.Test can be used in “header-only” or “separately compiled” +
    • Boost.Graph also has a binary component that is only needed if +you intend to parse GraphViz files.
    • +
    • Boost.Test can be used in “header-only” or “separately compiled” mode, although separate compilation is recommended for serious use.
    @@ -205,8 +206,8 @@ use.
    -
    -

    4   Build a Simple Program Using Boost

    +
    +

    4   Build a Simple Program Using Boost

    To keep things simple, let's start by using a header-only library. The following program reads a sequence of integers from standard input, uses Boost.Lambda to multiply each number by three, and @@ -230,7 +231,7 @@ int main()

    Now, in the directory where you saved example.cpp, issue the following command:

    -c++ -I path/to/boost_1_39_0 example.cpp -o example
    +c++ -I path/to/boost_1_40_0 example.cpp -o example
     

    To test the result, type:

    @@ -239,29 +240,29 @@ echo 1 2 3 | ./example
     
     
     
    -
    -

    4.1   Errors and Warnings

    +
    +

    4.1   Errors and Warnings

    Don't be alarmed if you see compiler warnings originating in Boost headers. We try to eliminate them, but doing so isn't always -practical.3 Errors are another matter. If you're +practical.3 Errors are another matter. If you're seeing compilation errors at this point in the tutorial, check to -be sure you've copied the example program correctly and that you've -correctly identified the Boost root directory.

    +be sure you've copied the example program correctly and that you've +correctly identified the Boost root directory.

    -
    -

    5   Prepare to Use a Boost Library Binary

    +
    +

    5   Prepare to Use a Boost Library Binary

    If you want to use any of the separately-compiled Boost libraries, you'll need to acquire library binaries.

    -
    -

    5.1   Easy Build and Install

    +
    +

    5.1   Easy Build and Install

    Issue the following commands in the shell (don't type $; that represents the shell's prompt):

    -$ cd path/to/boost_1_39_0
    +$ cd path/to/boost_1_40_0
     $ ./bootstrap.sh --help
     

    Select your configuration options and invoke ./bootstrap.sh again @@ -282,42 +283,42 @@ installation prefix. You will also find a copy of the Boost headers in the include/ subdirectory of the installation prefix, so you can henceforth use that directory as an #include path in place of the Boost root directory.

    -

    skip to the next step

    +

    skip to the next step

    -
    -

    5.2   Or, Build Custom Binaries

    +
    +

    5.2   Or, Build Custom Binaries

    If you're using a compiler other than your system's default, you'll -need to use Boost.Build to create binaries. You'll also +need to use Boost.Build to create binaries. You'll also use this method if you need a nonstandard build variant (see the -Boost.Build documentation for more details).

    +Boost.Build documentation for more details).

    -

    Boost.Build is a text-based system for developing, testing, and +

    Boost.Build is a text-based system for developing, testing, and installing software. To use it, you'll need an executable called bjam.

    -
    -

    5.2.1   Get bjam

    +
    +

    5.2.1   Get bjam

    bjam is the command-line tool that drives the Boost Build system. To build Boost binaries, you'll invoke bjam from the Boost root.

    -

    We suggest you download a pre-built bjam executable for your platform. -Alternatively, you can build bjam yourself using these +

    We suggest you download a pre-built bjam executable for your platform. +Alternatively, you can build bjam yourself using these instructions.

    Move the bjam executable into a directory in your PATH. You can see the list of directories in your PATH, separated by colons, by typing “echo $PATH” at the command prompt.

    -
    -

    5.2.2   Identify Your Toolset

    +
    +

    5.2.2   Identify Your Toolset

    First, find the toolset corresponding to your compiler in the -following table (an up-to-date list is always available in the +following table (an up-to-date list is always available in the Boost.Build documentation).

    Note

    If you previously chose a toolset for the purposes of -building bjam, you should assume it won't work and instead +building bjam, you should assume it won't work and instead choose newly from the table below.

    [8]This feature of STLPort is deprecated because it's +
    [8]This feature of STLPort is deprecated because it's impossible to make it work transparently to the user; we don't recommend it.
    @@ -346,7 +347,7 @@ known to work well with Boost @@ -408,34 +409,34 @@ you can append the version number to the toolset name, preceded by a hyphen, e.g. intel-9.0 or borland-5.4.3.

    -
    -

    5.2.3   Select a Build Directory

    -

    Boost.Build will place all intermediate files it generates while +

    +

    5.2.3   Select a Build Directory

    +

    Boost.Build will place all intermediate files it generates while building into the build directory. If your Boost root directory is writable, this step isn't strictly necessary: by default Boost.Build will create a bin.v2/ subdirectory for that purpose in your current working directory.

    -
    -

    5.2.4   Invoke bjam

    +
    +

    5.2.4   Invoke bjam

    Change your current directory to the Boost root directory and invoke bjam as follows:

    -bjam --build-dir=build-directory toolset=toolset-name   stage
    +bjam --build-dir=build-directory toolset=toolset-name   stage
     

    For a complete description of these and other invocation options, -please see the Boost.Build documentation.

    +please see the Boost.Build documentation.

    For example, your session might look like this:

    -$ cd ~/boost_1_39_0
    +$ cd ~/boost_1_40_0
     $ bjam --build-dir=/tmp/build-boost toolset=gcc stage
     
    -

    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``”.

    +

    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”.

    Building the special stage target places Boost -library binaries in the stage/lib/ subdirectory of your build +library binaries in the stage/lib/ subdirectory of your build directory.

    Note

    @@ -460,12 +461,12 @@ be interested in:

    Boost.Build can produce a great deal of output, which can make it easy to miss problems. If you want to make sure everything is went well, you might redirect the output into a -file by appending “``>build.log 2>&1``” to your command line.

    +file by appending “>build.log 2>&1” to your command line.

    -
    -

    5.3   Expected Build Output

    +
    +

    5.3   Expected Build Output

    During the process of building Boost libraries, you can expect to see some messages printed on the console. These may include

      @@ -488,28 +489,28 @@ look something like:

    -
    -

    5.4   In Case of Build Errors

    +
    +

    5.4   In Case of Build Errors

    The only error messages you see when building Boost—if any—should be related to the IOStreams library's support of zip and bzip2 -formats as described here. Install the relevant development +formats as described here. Install the relevant development packages for libz and libbz2 if you need those features. Other errors when building Boost libraries are cause for concern.

    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 +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.Build mailing list.

    -
    -

    6   Link Your Program to a Boost Library

    +
    - + - + - +
    como Comeau Computing Using this toolset may -require configuring another +require configuring another toolset to act as its backend
    cwusing debug versions of the standard and runtime support libraries.
    yusing a special debug build of Python.using a special debug build of Python.
    dbuilding a debug version of your code.5building a debug version of your code.5
    p using the STLPort standard library rather than the default one supplied with your compiler.
    nusing STLPort's deprecated “native iostreams” feature.6using STLPort's deprecated “native iostreams” feature.6
    @@ -655,8 +656,8 @@ version number, will also be created. -
    -

    6.2   Test Your Program

    +
    +

    6.2   Test Your Program

    To test our subject extraction, we'll filter the following text file. Copy it out of your browser and save it as jayne.txt:

    @@ -695,23 +696,23 @@ Spoil Rock Hunter?”

    -
    -

    7   Conclusion and Further Resources

    +
    +

    7   Conclusion and Further Resources

    This concludes your introduction to Boost and to integrating it with your programs. As you start using Boost in earnest, there are surely a few additional points you'll wish we had covered. One day we may have a “Book 2 in the Getting Started series” that addresses 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 -make this document clearer, please post it to the Boost Users' +make this document clearer, please post it to the Boost Users' mailing list.

    Onward

    @@ -724,17 +725,16 @@ mailing list.

    - +to the Boost developers' list.
    [1]

    If developers of Boost packages would like to work +

    [1]If developers of Boost packages would like to work with us to make sure these instructions can be used with their packages, we'd be glad to help. Please make your interest known -to the Boost developers' list.

    -
    -
    [2]That option is a dash followed by a lowercase “L” +
    [2]That option is a dash followed by a lowercase “L” character, which looks very much like a numeral 1 in some fonts.
    @@ -744,7 +744,7 @@ character, which looks very much like a numeral 1 in some fonts.
    -
    [3]Remember that warnings are specific to each compiler +
    [3]Remember that warnings are specific to each compiler implementation. The developer of a given Boost library might not have access to your compiler. Also, some warnings are extremely difficult to eliminate in generic code, to the point @@ -755,7 +755,7 @@ have any source code mechanism for suppressing warnings.
    - @@ -764,7 +764,7 @@ same name.
    [4]This convention distinguishes the static version of +
    [4]This convention distinguishes the static version of a Boost library from the import library for an identically-configured Boost DLL, which would otherwise have the same name.
    -
    [5]These libraries were compiled without optimization +
    [5]These libraries were compiled without optimization or inlining, with full debug symbols enabled, and without NDEBUG #defined. Although it's true that sometimes these choices don't affect binary compatibility with other @@ -774,7 +774,7 @@ compiled code, you can't count on that with Boost libraries.
    - diff --git a/getting_started/windows.html b/getting_started/windows.html index 9087dcc..4bfd2a5 100644 --- a/getting_started/windows.html +++ b/getting_started/windows.html @@ -3,86 +3,87 @@ - +Boost Getting Started on Windows
    -

    Getting Started on Windows

    +

    Getting Started on Windows

    +
    -

    A note to Cygwin and MinGW users

    +

    A note to Cygwin and MinGW users

    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 Cygwin +you're in the right place. If you plan to build from the Cygwin bash shell, you're actually running on a POSIX platform and -should follow the instructions for getting started on Unix -variants. Other command shells, such as MinGW's MSYS, are +should follow the instructions for getting started on Unix +variants. Other command shells, such as MinGW's MSYS, are not supported—they may or may not work.

    -
    -

    Index

    +
    +

    Index

    -
    -

    1   Get Boost

    +
    +

    1   Get Boost

    The easiest way to get a copy of Boost is to use an installer. The -Boost website version of this Getting Started guide will have +Boost website version of this Getting Started guide will have undated information on installers as they become available, or see -Boost downloads or the installer provided by BoostPro +Boost downloads or the installer provided by BoostPro Computing. We especially recommend using an installer if you use Microsoft Visual Studio, because the installer can download and install precompiled library binaries, saving you the trouble of building them yourself. To complete this tutorial, you'll need to at -least install the Static Multithreaded variants of the Boost.Regex +least install the Static Multithreaded variants of the Boost.Regex binaries when given the option.

    If you're using an earlier version of Visual Studio or some other compiler, or if you prefer to build everything yourself, you can -download boost_1_39_0.7z or boost_1_39_0.zip and unpack it to install a complete Boost -distribution.1

    +download boost_1_40_0.7z or boost_1_40_0.zip and unpack it to install a complete Boost +distribution.1

    -
    -

    2   The Boost Distribution

    +
    +

    2   The Boost Distribution

    This is a sketch of the resulting directory structure:

    -boost_1_39_0\ .................The “boost root directory”
    +boost_1_40_0\ .................The “boost root directory”
        index.htm .........A copy of www.boost.org starts here
        boost\ .........................All Boost Header files
        lib\ .....................precompiled library binaries
    @@ -114,7 +115,7 @@ the Python library's def.hpp
     
  • Some libraries have an “aggregate header” in boost\ that #includes all of the library's other headers. For -example, Boost.Python's aggregate header is

    +example, Boost.Python's aggregate header is

     boost\python.hpp.
     
    @@ -127,7 +128,7 @@ anything you can use in these directories.

  • It's important to note the following:

      -
    1. The path to the boost root directory (often C:\Program Files\boost\boost_1_39_0) is +

    2. The path to the boost root directory (often C:\Program Files\boost\boost_1_40_0) is sometimes referred to as $BOOST_ROOT in documentation and mailing lists .

    3. @@ -161,8 +162,8 @@ contains a subset of the Boost documentation. Start with
    -
    -

    3   Header-Only Libraries

    +
    +

    3   Header-Only Libraries

    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.

    @@ -175,26 +176,26 @@ treatment when linking.

    The only Boost libraries that must be built separately are:

    A few libraries have optional separately-compiled binaries:

      -
    • Boost.DateTime has a binary component that is only needed if +
    • Boost.DateTime has a binary component that is only needed if you're using its to_string/from_string or serialization features, or if you're targeting Visual C++ 6.x or Borland.
    • -
    • Boost.Graph also has a binary component that is only needed if -you intend to parse GraphViz files.
    • -
    • Boost.Test can be used in “header-only” or “separately compiled” +
    • Boost.Graph also has a binary component that is only needed if +you intend to parse GraphViz files.
    • +
    • Boost.Test can be used in “header-only” or “separately compiled” mode, although separate compilation is recommended for serious use.
    @@ -202,8 +203,8 @@ use.
    -
    -

    4   Build a Simple Program Using Boost

    +
    +

    4   Build a Simple Program Using Boost

    To keep things simple, let's start by using a header-only library. The following program reads a sequence of integers from standard input, uses Boost.Lambda to multiply each number by three, and @@ -224,11 +225,11 @@ int main() }

    Copy the text of this program into a file called example.cpp.

    -
    -

    Note

    +
    +

    Note

    To build the examples in this guide, you can use an Integrated Development Environment (IDE) like Visual Studio, or -you can issue commands from the command prompt. Since every +you can issue commands from the command prompt. Since every IDE and compiler has different options and Microsoft's are by far the dominant compilers on Windows, we only give specific directions here for Visual Studio 2005 and .NET 2003 IDEs and @@ -252,14 +253,14 @@ cd path\to\some\directory

    followed by Return. For example,

    -cd C:\Program Files\boost\boost_1_39_0
    +cd C:\Program Files\boost\boost_1_40_0
     

    Long commands can be continued across several lines by typing a caret (^) at the end of all but the last line. Some examples on this page use that technique to save horizontal space.

    -
    -

    4.1   Build From the Visual Studio IDE

    +
    +

    4.1   Build From the Visual Studio IDE

    • From Visual Studio's File menu, select New > Project…

    • @@ -277,12 +278,12 @@ select Properties from the resulting pop-up menu

    • In Configuration Properties > C/C++ > General > Additional Include Directories, enter the path to the Boost root directory, for example

      -

      C:\Program Files\boost\boost_1_39_0

      +

      C:\Program Files\boost\boost_1_40_0

    • In Configuration Properties > C/C++ > Precompiled Headers, change Use Precompiled Header (/Yu) to Not Using Precompiled -Headers.3

      +Headers.3

    • Replace the contents of the example.cpp generated by the IDE with the example code above.

      @@ -297,10 +298,10 @@ into the resulting window, followed by the Return key:

      Then hold down the control key and press "Z", followed by the Return key.

      -

      skip to the next step

      +

      skip to the next step

    -
    -

    4.2   Or, Build From the Command Prompt

    +
    +

    4.2   Or, Build From the Command Prompt

    From your computer's Start menu, if you are a Visual Studio 2005 user, select

    @@ -310,12 +311,12 @@ Studio 2005 user, select

    All Programs > Microsoft Visual Studio .NET 2003 > Visual Studio .NET Tools > Visual Studio .NET 2003 Command Prompt
    -

    to bring up a special command prompt window set up for the -Visual Studio compiler. In that window, set the current +

    to bring up a special command prompt window set up for the +Visual Studio compiler. In that window, set the current directory to a suitable location for creating some temporary files and type the following command followed by the Return key:

    -cl /EHsc /I path\to\boost_1_39_0 path\to\example.cpp
    +cl /EHsc /I path\to\boost_1_40_0 path\to\example.cpp
     

    To test the result, type:

    @@ -325,35 +326,35 @@ echo 1 2 3 | example
     
     
     
    -
    -

    4.3   Errors and Warnings

    +
    +

    4.3   Errors and Warnings

    Don't be alarmed if you see compiler warnings originating in Boost headers. We try to eliminate them, but doing so isn't always -practical.5 Errors are another matter. If you're +practical.5 Errors are another matter. If you're seeing compilation errors at this point in the tutorial, check to -be sure you've copied the example program correctly and that you've -correctly identified the Boost root directory.

    +be sure you've copied the example program correctly and that you've +correctly identified the Boost root directory.

    -
    -

    5   Prepare to Use a Boost Library Binary

    +
    +

    5   Prepare to Use a Boost Library Binary

    If you want to use any of the separately-compiled Boost libraries, you'll need to acquire library binaries.

    -
    -

    5.1   Install Visual Studio Binaries

    +
    +

    5.1   Install Visual Studio Binaries

    The installers supplied by BoostPro Computing will download and install pre-compiled binaries into the lib\ subdirectory of the -boost root, typically C:\Program Files\boost\boost_1_39_0\lib\. If you installed -all variants of the Boost.Regex binary, you're done with this +boost root, typically C:\Program Files\boost\boost_1_40_0\lib\. If you installed +all variants of the Boost.Regex binary, you're done with this step. Otherwise, please run the installer again and install them now.

    -

    skip to the next step

    +

    skip to the next step

    -
    -

    5.2   Or, Simplified Build From Source

    +
    +

    5.2   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 @@ -364,42 +365,42 @@ bootstrap

    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 +libraries. Please consult the Boost.Build documentation for a list of options that can be passed to bjam.

    -
    -

    5.3   Or, Build Binaries From Source

    +
    +

    5.3   Or, Build Binaries From Source

    If you're using an earlier version of Visual C++, or a compiler -from another vendor, you'll need to use Boost.Build to create your +from another vendor, you'll need to use Boost.Build to create your own binaries.

    -

    Boost.Build is a text-based system for developing, testing, and +

    Boost.Build is a text-based system for developing, testing, and installing software. To use it, you'll need an executable called bjam.

    -
    -

    5.3.1   Get bjam

    -

    bjam is the command-line tool that drives the Boost Build +

    +

    5.3.1   Get bjam

    +

    bjam is the command-line tool that drives the Boost Build system. To build Boost binaries, you'll invoke bjam from the Boost root.

    -

    We suggest you download a pre-built bjam executable for your platform. -Alternatively, you can build bjam yourself using these +

    We suggest you download a pre-built bjam executable for your platform. +Alternatively, you can build bjam yourself using these instructions.

    Move the bjam executable into a directory in your PATH. You can see the list of directories in your PATH, separated by semicolons, by typing “PATH” at the command prompt.

    -
    -

    5.3.2   Identify Your Toolset

    +
    +

    5.3.2   Identify Your Toolset

    First, find the toolset corresponding to your compiler in the -following table (an up-to-date list is always available in the +following table (an up-to-date list is always available in the Boost.Build documentation).

    Note

    If you previously chose a toolset for the purposes of -building bjam, you should assume it won't work and instead +building bjam, you should assume it won't work and instead choose newly from the table below.

    [6]This feature of STLPort is deprecated because it's +
    [6]This feature of STLPort is deprecated because it's impossible to make it work transparently to the user; we don't recommend it.
    @@ -428,7 +429,7 @@ known to work well with Boost @@ -491,43 +492,43 @@ a hyphen, e.g. intel-9.0borland-5.4.3. On Windows, append a version number even if you only have one version installed (unless you are using the msvc or gcc toolsets, which have special version -detection code) or auto-linking will fail.

    +detection code) or auto-linking will fail.

    -
    -

    5.3.3   Select a Build Directory

    -

    Boost.Build will place all intermediate files it generates while +

    +

    5.3.3   Select a Build Directory

    +

    Boost.Build will place all intermediate files it generates while building into the build directory. If your Boost root directory is writable, this step isn't strictly necessary: by default Boost.Build will create a bin.v2/ subdirectory for that purpose in your current working directory.

    -
    -

    5.3.4   Invoke bjam

    +
    +

    5.3.4   Invoke bjam

    Change your current directory to the Boost root directory and invoke bjam as follows:

    -bjam --build-dir=build-directory toolset=toolset-name --build-type=complete stage
    +bjam --build-dir=build-directory toolset=toolset-name --build-type=complete stage
     

    For a complete description of these and other invocation options, -please see the Boost.Build documentation.

    -

    For example, your session might look like this:4

    +please see the Boost.Build documentation.

    +

    For example, your session might look like this:4

    -C:\WINDOWS> cd C:\Program Files\boost\boost_1_39_0
    -C:\Program Files\boost\boost_1_39_0> bjam ^
    +C:\WINDOWS> cd C:\Program Files\boost\boost_1_40_0
    +C:\Program Files\boost\boost_1_40_0> bjam ^
     More? --build-dir="C:\Documents and Settings\dave\build-boost" ^
     More? --build-type=complete msvc stage
     
    -

    Be sure to read this note about the appearance of ^, +

    Be sure to read this note about the appearance of ^, More? and quotation marks (") in that line.

    The option “--build-type=complete” causes bjam 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.Build mailing list.

    Building the special stage target places Boost -library binaries in the stage\lib\ subdirectory of your build +library binaries in the stage\lib\ subdirectory of your build directory.

    Note

    @@ -552,12 +553,12 @@ be interested in:

    Boost.Build can produce a great deal of output, which can make it easy to miss problems. If you want to make sure everything is went well, you might redirect the output into a -file by appending “``>build.log 2>&1``” to your command line.

    +file by appending “>build.log 2>&1” to your command line.

    -
    -

    5.4   Expected Build Output

    +
    +

    5.4   Expected Build Output

    During the process of building Boost libraries, you can expect to see some messages printed on the console. These may include

      @@ -580,28 +581,28 @@ look something like:

    -
    -

    5.5   In Case of Build Errors

    +
    +

    5.5   In Case of Build Errors

    The only error messages you see when building Boost—if any—should be related to the IOStreams library's support of zip and bzip2 -formats as described here. Install the relevant development +formats as described here. Install the relevant development packages for libz and libbz2 if you need those features. Other errors when building Boost libraries are cause for concern.

    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 +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.Build mailing list.

    -
    -

    6   Link Your Program to a Boost Library

    + -
    -

    6.1   Link From Within the Visual Studio IDE

    -

    Starting with the header-only example project we created +

    -
    -

    6.2   Or, Link From the Command Prompt

    + -
    -

    6.3   Library Naming

    +
    +

    6.3   Library Naming

    Note

    If, like Visual C++, your compiler supports auto-linking, -you can probably skip to the next step.

    +you can probably skip to the next step.

    @@ -690,11 +691,11 @@ following elements:

    Prefix: except on Microsoft Windows, every Boost library name begins with this string. On Windows, only ordinary static libraries use the lib prefix; import libraries and DLLs do -not.6
    +not.6
    boost_regex
    Library name: all boost library filenames begin with boost_.
    -vc71
    -
    Toolset tag: identifies the toolset and version used to build +
    Toolset tag: identifies the toolset and version used to build the binary.
    -mt
    Threading tag: indicates that the library was @@ -725,17 +726,17 @@ libraries.
    - + - + - +
    como Comeau Computing Using this toolset may -require configuring another +require configuring another toolset to act as its backend
    cwusing debug versions of the standard and runtime support libraries.
    yusing a special debug build of Python.using a special debug build of Python.
    dbuilding a debug version of your code.7building a debug version of your code.7
    p using the STLPort standard library rather than the default one supplied with your compiler.
    nusing STLPort's deprecated “native iostreams” feature.8using STLPort's deprecated “native iostreams” feature.8
    @@ -766,8 +767,8 @@ version number, will also be created.
    -
    -

    6.4   Test Your Program

    +
    +

    6.4   Test Your Program

    To test our subject extraction, we'll filter the following text file. Copy it out of your browser and save it as jayne.txt:

    @@ -777,7 +778,7 @@ Subject: Will Success Spoil Rock Hunter?
     ---
     See subject.
     
    -

    Now, in a command prompt window, type:

    +

    Now, in a command prompt window, type:

     path\to\compiled\example < path\to\jayne.txt
     
    @@ -788,23 +789,23 @@ Spoil Rock Hunter?”

    -
    -

    7   Conclusion and Further Resources

    +
    +

    7   Conclusion and Further Resources

    This concludes your introduction to Boost and to integrating it with your programs. As you start using Boost in earnest, there are surely a few additional points you'll wish we had covered. One day we may have a “Book 2 in the Getting Started series” that addresses 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 -make this document clearer, please post it to the Boost Users' +make this document clearer, please post it to the Boost Users' mailing list.

    Onward

    @@ -817,8 +818,8 @@ mailing list.

    - @@ -827,7 +828,7 @@ built-in decompression as it can be painfully slow for large archives.
    [1]We recommend -downloading boost_1_39_0.7z and using 7-Zip to decompress +
    [1]We recommend +downloading boost_1_40_0.7z and using 7-Zip to decompress it. We no longer recommend .zip files for Boost because they are twice as large as the equivalent .7z files. We don't recommend using Windows' built-in decompression as it can be painfully slow for large archives.
    -
    [2]If you used the installer from Boost +
    [2]If you used the installer from Boost Consulting and deselected “Source and Documentation” (it's selected by default), you won't see the libs/ subdirectory. That won't affect your ability to use precompiled binaries, but @@ -837,7 +838,7 @@ you won't be able to rebuild libraries from scratch.
    - @@ -846,7 +847,7 @@ used in the examples.
    [3]There's no problem using Boost with precompiled headers; +
    [3]There's no problem using Boost with precompiled headers; these instructions merely avoid precompiled headers because it would require Visual Studio-specific changes to the source code used in the examples.
    -
    [4]

    In this example, the caret character ^ is a +

    [4]

    In this example, the caret character ^ is a way of continuing the command on multiple lines, and must be the final character used on the line to be continued (i.e. do not follow it with spaces). The command prompt responds with @@ -873,7 +874,7 @@ command-line argument contains spaces, as in

    -
    [5]Remember that warnings are specific to each compiler +
    [5]Remember that warnings are specific to each compiler implementation. The developer of a given Boost library might not have access to your compiler. Also, some warnings are extremely difficult to eliminate in generic code, to the point @@ -884,7 +885,7 @@ have any source code mechanism for suppressing warnings.
    - @@ -893,7 +894,7 @@ same name.
    [6]This convention distinguishes the static version of +
    [6]This convention distinguishes the static version of a Boost library from the import library for an identically-configured Boost DLL, which would otherwise have the same name.
    -
    [7]These libraries were compiled without optimization +
    [7]These libraries were compiled without optimization or inlining, with full debug symbols enabled, and without NDEBUG #defined. Although it's true that sometimes these choices don't affect binary compatibility with other @@ -903,7 +904,7 @@ compiled code, you can't count on that with Boost libraries.
    - From 5c09905f9463cd7f768891a94ae3e74ef6e278a1 Mon Sep 17 00:00:00 2001 From: Daniel James Date: Sat, 16 May 2009 14:23:59 +0000 Subject: [PATCH 6/6] Use a local copy of the valid HTML 4.01 icon. [SVN r53048] --- writingdoc/design.html | 2 +- writingdoc/index.html | 2 +- writingdoc/introduction.html | 2 +- writingdoc/structure.html | 2 +- writingdoc/template/acknowledgments.html | 2 +- writingdoc/template/bibliography.html | 2 +- writingdoc/template/configuration.html | 2 +- writingdoc/template/definitions.html | 2 +- writingdoc/template/faq.html | 2 +- writingdoc/template/header.html | 2 +- writingdoc/template/index.html | 2 +- writingdoc/template/overview.html | 2 +- writingdoc/template/rationale.html | 2 +- 13 files changed, 13 insertions(+), 13 deletions(-) diff --git a/writingdoc/design.html b/writingdoc/design.html index 7e95a63..cb47fef 100644 --- a/writingdoc/design.html +++ b/writingdoc/design.html @@ -558,7 +558,7 @@

    Valid HTML 4.01 Transitional

    Revised diff --git a/writingdoc/index.html b/writingdoc/index.html index 869c590..6514369 100644 --- a/writingdoc/index.html +++ b/writingdoc/index.html @@ -39,7 +39,7 @@


    Valid HTML 4.01 Transitional

    Revised diff --git a/writingdoc/introduction.html b/writingdoc/introduction.html index 29f737b..2928a94 100644 --- a/writingdoc/introduction.html +++ b/writingdoc/introduction.html @@ -50,7 +50,7 @@


    Valid HTML 4.01 Transitional

    Revised diff --git a/writingdoc/structure.html b/writingdoc/structure.html index d3783fc..900f2a6 100644 --- a/writingdoc/structure.html +++ b/writingdoc/structure.html @@ -415,7 +415,7 @@ void resize(size_type n, charT c);


    Valid HTML 4.01 Transitional

    Revised diff --git a/writingdoc/template/acknowledgments.html b/writingdoc/template/acknowledgments.html index bfb9e5d..9a49950 100644 --- a/writingdoc/template/acknowledgments.html +++ b/writingdoc/template/acknowledgments.html @@ -30,7 +30,7 @@


    Valid HTML 4.01 Transitional

    Revised diff --git a/writingdoc/template/bibliography.html b/writingdoc/template/bibliography.html index c824b07..6704847 100644 --- a/writingdoc/template/bibliography.html +++ b/writingdoc/template/bibliography.html @@ -30,7 +30,7 @@


    Valid HTML 4.01 Transitional

    Revised diff --git a/writingdoc/template/configuration.html b/writingdoc/template/configuration.html index 6eaebf0..e32eff4 100644 --- a/writingdoc/template/configuration.html +++ b/writingdoc/template/configuration.html @@ -127,7 +127,7 @@


    Valid HTML 4.01 Transitional

    Revised diff --git a/writingdoc/template/definitions.html b/writingdoc/template/definitions.html index 25b22d5..03fa343 100644 --- a/writingdoc/template/definitions.html +++ b/writingdoc/template/definitions.html @@ -60,7 +60,7 @@


    Valid HTML 4.01 Transitional

    Revised diff --git a/writingdoc/template/faq.html b/writingdoc/template/faq.html index 3133fae..7d30768 100644 --- a/writingdoc/template/faq.html +++ b/writingdoc/template/faq.html @@ -43,7 +43,7 @@


    Valid HTML 4.01 Transitional

    Revised diff --git a/writingdoc/template/header.html b/writingdoc/template/header.html index e16500d..a0141f8 100644 --- a/writingdoc/template/header.html +++ b/writingdoc/template/header.html @@ -328,7 +328,7 @@ namespace boost


    Valid HTML 4.01 Transitional

    Revised diff --git a/writingdoc/template/index.html b/writingdoc/template/index.html index e360ab3..82fe9d9 100644 --- a/writingdoc/template/index.html +++ b/writingdoc/template/index.html @@ -108,7 +108,7 @@


    Valid HTML 4.01 Transitional

    Revised diff --git a/writingdoc/template/overview.html b/writingdoc/template/overview.html index c931bc5..d4a443d 100644 --- a/writingdoc/template/overview.html +++ b/writingdoc/template/overview.html @@ -61,7 +61,7 @@


    Valid HTML 4.01 Transitional

    Revised diff --git a/writingdoc/template/rationale.html b/writingdoc/template/rationale.html index bb450a0..7ea0c9d 100644 --- a/writingdoc/template/rationale.html +++ b/writingdoc/template/rationale.html @@ -61,7 +61,7 @@


    Valid HTML 4.01 Transitional

    Revised

    [8]This feature of STLPort is deprecated because it's +
    [8]This feature of STLPort is deprecated because it's impossible to make it work transparently to the user; we don't recommend it.