From 673ec9fe6a11e0952e96e99954b66fff1fd51e3c Mon Sep 17 00:00:00 2001 From: Daniel James Date: Sat, 24 Apr 2010 16:25:05 +0000 Subject: Merge release info, and some other hanging changes. [SVN r61540] --- more/getting_started/detail/library-naming.rst | 32 ++- more/getting_started/detail/release-variables.rst | 6 +- more/getting_started/index.html | 2 +- more/getting_started/unix-variants.html | 264 ++++++++++---------- more/getting_started/windows.html | 286 +++++++++++----------- 5 files changed, 298 insertions(+), 292 deletions(-) (limited to 'more') diff --git a/more/getting_started/detail/library-naming.rst b/more/getting_started/detail/library-naming.rst index 9797b772ad..63854ab398 100644 --- a/more/getting_started/detail/library-naming.rst +++ b/more/getting_started/detail/library-naming.rst @@ -33,23 +33,21 @@ following elements: interoperability with other compiled code. For each such feature, a single letter is added to the tag: - +-----+------------------------------------------------------------------------------+ - |Key |Use this library when: | - +=====+==============================================================================+ - |``s``|linking statically to the C++ standard library and compiler runtime support | - | |libraries. | - +-----+------------------------------------------------------------------------------+ - |``g``|using debug versions of the standard and runtime support libraries. | - +-----+------------------------------------------------------------------------------+ - |``y``|using a special `debug build of Python`__. | - +-----+------------------------------------------------------------------------------+ - |``d``|building a debug version of your code. [#debug-abi]_ | - +-----+------------------------------------------------------------------------------+ - |``p``|using the STLPort standard library rather than the default one supplied with | - | |your compiler. | - +-----+------------------------------------------------------------------------------+ - |``n``|using STLPort's deprecated “native iostreams” feature. [#native]_ | - +-----+------------------------------------------------------------------------------+ + +-----+------------------------------------------------------------------------------+---------------------+ + |Key |Use this library when: |Boost.Build option | + +=====+==============================================================================+=====================+ + |``s``|linking statically to the C++ standard library and compiler runtime support |runtime-link=static | + | |libraries. | | + +-----+------------------------------------------------------------------------------+---------------------+ + |``g``|using debug versions of the standard and runtime support libraries. |runtime-debugging=on | + +-----+------------------------------------------------------------------------------+---------------------+ + |``y``|using a special `debug build of Python`__. |python-debugging=on | + +-----+------------------------------------------------------------------------------+---------------------+ + |``d``|building a debug version of your code. [#debug-abi]_ |variant=debug | + +-----+------------------------------------------------------------------------------+---------------------+ + |``p``|using the STLPort standard library rather than the default one supplied with |stdlib=stlport | + | |your compiler. | | + +-----+------------------------------------------------------------------------------+---------------------+ For example, if you build a debug version of your code for use with debug versions of the static runtime library and the diff --git a/more/getting_started/detail/release-variables.rst b/more/getting_started/detail/release-variables.rst index a8736d75a0..3d5a536825 100644 --- a/more/getting_started/detail/release-variables.rst +++ b/more/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.42.0 -.. |boost_ver| replace:: ``boost_1_42_0`` -.. |boost_ver-bold| replace:: **boost_1_42_0** +.. |boost-version-number| replace:: 1.43.0 +.. |boost_ver| replace:: ``boost_1_43_0`` +.. |boost_ver-bold| replace:: **boost_1_43_0** .. _sf-download: http://sourceforge.net/project/showfiles.php?group_id=7586&package_id=8041 diff --git a/more/getting_started/index.html b/more/getting_started/index.html index 9a39aa61cd..3722fe7817 100644 --- a/more/getting_started/index.html +++ b/more/getting_started/index.html @@ -3,7 +3,7 @@ - + Boost Getting Started diff --git a/more/getting_started/unix-variants.html b/more/getting_started/unix-variants.html index 47c29d8588..27e7f4b532 100644 --- a/more/getting_started/unix-variants.html +++ b/more/getting_started/unix-variants.html @@ -3,7 +3,7 @@ - + Boost Getting Started on Unix Variants @@ -30,45 +30,45 @@

Index

-

1   Get Boost

+

1   Get Boost

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

    -
  1. Download boost_1_42_0.tar.bz2.

    +
  2. Download boost_1_43_0.tar.bz2.

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

    -tar --bzip2 -xf /path/to/boost_1_42_0.tar.bz2
    +tar --bzip2 -xf /path/to/boost_1_43_0.tar.bz2
     
@@ -88,10 +88,10 @@ from -

2   The Boost Distribution

+

2   The Boost Distribution

This is a sketch of the resulting directory structure:

-boost_1_42_0/ .................The “boost root directory”
+boost_1_43_0/ .................The “boost root directory”
    index.htm .........A copy of www.boost.org starts here
    boost/ .........................All Boost Header files
     
@@ -112,40 +112,40 @@ from 
 
  • Some older libraries and most very small libraries place all -public headers directly into boost/.

    +public headers directly into boost/.

  • Most libraries' public headers live in a subdirectory of -boost/, named after the library. For example, you'll find -the Python library's def.hpp header in

    +boost/, named after the library. For example, you'll find +the Python library's def.hpp header in

    -boost/python/def.hpp.
    +boost/python/def.hpp.
     
  • -
  • Some libraries have an “aggregate header” in boost/ that -#includes all of the library's other headers. For +

  • 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

    -boost/python.hpp.
    +boost/python.hpp.
     
  • Most libraries place private headers in a subdirectory called -detail/, or aux_/. Don't expect to find +detail/, or aux_/. Don't expect to find 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_42_0) is -sometimes referred to as $BOOST_ROOT in documentation and +

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

    3. To compile anything in Boost, you need a directory containing -the boost/ subdirectory in your #include path.

      +the boost/ subdirectory in your #include path.

    4. -
    5. Since all of Boost's header files have the .hpp extension, -and live in the boost/ subdirectory of the boost root, your -Boost #include directives will look like:

      +
    6. Since all of Boost's header files have the .hpp extension, +and live in the boost/ subdirectory of the boost root, your +Boost #include directives will look like:

       #include <boost/whatever.hpp>
       
      @@ -156,9 +156,9 @@ Boost #include directives will look like:

      depending on your preference regarding the use of angle bracket includes.

    7. -
    8. Don't be distracted by the doc/ subdirectory; it only +

    9. Don't be distracted by the doc/ subdirectory; it only contains a subset of the Boost documentation. Start with -libs/index.html if you're looking for the whole enchilada.

      +libs/index.html if you're looking for the whole enchilada.

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

    @@ -194,7 +194,7 @@ before building and installing it)

    A few libraries have optional separately-compiled binaries:

    • Boost.DateTime has a binary component that is only needed if -you're using its to_string/from_string or serialization +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.
    • @@ -207,7 +207,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 @@ -227,11 +227,11 @@ int main() in(std::cin), in(), std::cout << (_1 * 3) << " " ); } -

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

    -

    Now, in the directory where you saved example.cpp, issue the +

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

    +

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

    -c++ -I path/to/boost_1_42_0 example.cpp -o example
    +c++ -I path/to/boost_1_43_0 example.cpp -o example
     

    To test the result, type:

    @@ -241,7 +241,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 @@ -254,20 +254,20 @@ 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

    -

    Issue the following commands in the shell (don't type $; that +

    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_42_0
    +$ cd path/to/boost_1_43_0
     $ ./bootstrap.sh --help
     
    -

    Select your configuration options and invoke ./bootstrap.sh 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 +your system's /usr/local/ directory, you'll probably want to at least use

     $ ./bootstrap.sh --prefix=path/to/installation/prefix
    @@ -278,15 +278,15 @@ long wait you'll experience if you build everything.  Finally,

     $ ./bjam install
     
    -

    will leave Boost binaries in the lib/ subdirectory of your +

    will leave Boost binaries in the lib/ subdirectory of your installation prefix. You will also find a copy of the Boost -headers in the include/ subdirectory of the installation -prefix, so you can henceforth use that directory as an #include +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

    -

    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 @@ -302,22 +302,22 @@ separately. See the Boost.Build is a text-based system for developing, testing, and installing software. To use it, you'll need an executable called -bjam.

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

    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 +

    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.

    +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 Boost.Build documentation).

    @@ -341,70 +341,70 @@ Name -acc +acc Hewlett Packard Only very recent versions are known to work well with Boost -borland +borland Borland   -como +como Comeau Computing Using this toolset may require configuring another toolset to act as its backend -cw +cw Metrowerks/Freescale The CodeWarrior compiler. We have not tested versions of this compiler produced since it was sold to Freescale. -dmc +dmc Digital Mars As of this Boost release, no version of dmc is known to handle Boost well. -darwin +darwin Apple Computer Apple's version of the GCC toolchain with support for Darwin and MacOS X features such as frameworks. -gcc +gcc The Gnu Project Includes support for Cygwin and MinGW compilers. -hp_cxx +hp_cxx Hewlett Packard Targeted at the Tru64 operating system. -intel +intel Intel   -msvc +msvc Microsoft   -qcc +qcc QNX Software Systems   -sun +sun Sun Only very recent versions are known to work well with Boost. -vacpp +vacpp IBM The VisualAge C++ compiler. @@ -416,17 +416,17 @@ 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 -default Boost.Build will create a bin.v2/ subdirectory for that +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:

    +invoke bjam as follows:

     bjam --build-dir=build-directory toolset=toolset-name   stage
     
    @@ -434,23 +434,23 @@ bjam --build-dir=Boost.Build documentation.

    For example, your session might look like this:

    -$ cd ~/boost_1_42_0
    +$ cd ~/boost_1_43_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 +

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

    Note

    -

    bjam is case-sensitive; it is important that all the +

    bjam is case-sensitive; it is important that all the parts shown in bold type above be entirely lower-case.

    For a description of other options you can pass when invoking -bjam, type:

    +bjam, type:

     bjam --help
     
    @@ -459,20 +459,20 @@ be interested in:

    • reviewing the list of library names with --show-libraries
    • limiting which libraries get built with the --with-library-name or --without-library-name options
    • -
    • choosing a specific build variant by adding release or -debug to the command line.
    • +
    • choosing a specific build variant by adding release or +debug to the command line.

    Note

    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

      @@ -496,7 +496,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 @@ -513,7 +513,7 @@ for your compiler to the -

    6   Link Your Program to a Boost Library

    +

    6   Link Your Program to a Boost Library

    To demonstrate linking with a Boost binary library, we'll use the following simple program that extracts the subject lines from emails. It uses the Boost.Regex library, which has a @@ -549,21 +549,21 @@ project.

    1. You can specify the full path to each library:

      -$ c++ -I path/to/boost_1_42_0 example.cpp -o example \
      +$ c++ -I path/to/boost_1_43_0 example.cpp -o example \
          ~/boost/stage/lib/libboost_regex-gcc34-mt-d-1_36.a
       
    2. -
    3. You can separately specify a directory to search (with -Ldirectory) and a library name to search for (with -llibrary,2 dropping the filename's leading lib and trailing -suffix (.a in this case):

      +
    4. You can separately specify a directory to search (with -Ldirectory) and a library name to search for (with -llibrary,2 dropping the filename's leading lib and trailing +suffix (.a in this case):

      -$ c++ -I path/to/boost_1_42_0 example.cpp -o example \
      +$ c++ -I path/to/boost_1_43_0 example.cpp -o example \
          -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 libraries from the same directory. Note, however, that if you -use this method with a library that has both static (.a) and -dynamic (.so) builds, the system may choose one +use this method with a library that has both static (.a) and +dynamic (.so) builds, the system may choose one automatically for you unless you pass a special option such as -static on the command line.

    5. @@ -571,7 +571,7 @@ automatically for you unless you pass a special option such as

      In both cases above, the bold text is what you'd add to the command lines we explored earlier.

      -

      6.1   Library Naming

      +

      6.1   Library Naming

      @@ -582,13 +582,13 @@ how it was built. For example, libboost_regex-vc71-mt-d-1_34.lib can be broken down into the following elements:

      -
      lib
      +
      lib
      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 +libraries use the lib prefix; import libraries and DLLs do not.4
      -
      boost_regex
      -
      Library name: all boost library filenames begin with boost_.
      +
      boost_regex
      +
      Library name: all boost library filenames begin with boost_.
      -vc71
      Toolset tag: identifies the toolset and version used to build the binary.
      @@ -604,34 +604,38 @@ feature, a single letter is added to the tag:

      --+++ + - + + - + + - + + - + + - + - - - +
      Key Use this library when:Boost.Build option
      s
      s linking statically to the C++ standard library and compiler runtime support libraries.runtime-link=static
      g
      g using debug versions of the standard and runtime support libraries.runtime-debugging=on
      y
      y using a special debug build of Python.python-debugging=on
      d
      d building a debug version of your code.5variant=debug
      p
      p using the STLPort standard library rather than the default one supplied with your compiler.
      nusing STLPort's deprecated “native iostreams” feature.6stdlib=stlport
      @@ -646,12 +650,12 @@ ABI tag is ommitted.

      Version tag: the full Boost release number, with periods replaced by underscores. For example, version 1.31.1 would be tagged as "-1_31_1".
      -
      .lib
      +
      .lib
      Extension: determined according to the operating system's usual convention. On most unix-style platforms the extensions are -.a and .so for static libraries (archives) and shared -libraries, respectively. On Windows, .dll indicates a shared -library and .lib indicates a +.a and .so for static libraries (archives) and shared +libraries, respectively. On Windows, .dll indicates a shared +library and .lib indicates a static or import library. Where supported by toolsets on unix variants, a full version extension is added (e.g. ".so.1.34") and a symbolic link to the library file, named without the trailing @@ -663,9 +667,9 @@ 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:

      +file. Copy it out of your browser and save it as jayne.txt:

       To: George Shmidlap
       From: Rita Marlowe
      @@ -678,15 +682,15 @@ platform-specific settings so that the system will be able to find
       and load it when your program is run.  Most platforms have an
       environment variable to which you can add the directory containing
       the library.  On many platforms (Linux, FreeBSD) that variable is
      -LD_LIBRARY_PATH, but on MacOS it's DYLD_LIBRARY_PATH, and
      -on Cygwin it's simply PATH.  In most shells other than csh
      -and tcsh, you can adjust the variable as follows (again, don't
      -type the $—that represents the shell prompt):

      +LD_LIBRARY_PATH, but on MacOS it's DYLD_LIBRARY_PATH, and +on Cygwin it's simply PATH. In most shells other than csh +and tcsh, you can adjust the variable as follows (again, don't +type the $—that represents the shell prompt):

       $ VARIABLE_NAME=path/to/lib/directory:${VARIABLE_NAME}
       $ export VARIABLE_NAME
       
      -

      On csh and tcsh, it's

      +

      On csh and tcsh, it's

       $ setenv VARIABLE_NAME path/to/lib/directory:${VARIABLE_NAME}
       
      @@ -703,7 +707,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 @@ -772,7 +776,7 @@ same name. [5]These libraries were compiled without optimization or inlining, with full debug symbols enabled, and without -NDEBUG #defined. Although it's true that sometimes +NDEBUG #defined. Although it's true that sometimes these choices don't affect binary compatibility with other compiled code, you can't count on that with Boost libraries. @@ -780,7 +784,7 @@ compiled code, you can't count on that with Boost libraries. - diff --git a/more/getting_started/windows.html b/more/getting_started/windows.html index 2c274ee21b..ef9a7df612 100644 --- a/more/getting_started/windows.html +++ b/more/getting_started/windows.html @@ -3,7 +3,7 @@ - +Boost Getting Started on Windows @@ -26,41 +26,41 @@ 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 @@ -73,17 +73,17 @@ least install the Static Multithreaded variants of the boost_1_42_0.7z or boost_1_42_0.zip and unpack it to install a complete Boost +download boost_1_43_0.7z or boost_1_43_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_42_0\ .................The “boost root directory”
    +boost_1_43_0\ .................The “boost root directory”
        index.htm .........A copy of www.boost.org starts here
        boost\ .........................All Boost Header files
        lib\ .....................precompiled library binaries
    @@ -104,43 +104,43 @@ distribution.1
     but most libraries follow a few patterns:

    • Some older libraries and most very small libraries place all -public headers directly into boost\.

      +public headers directly into boost\.

    • Most libraries' public headers live in a subdirectory of -boost\, named after the library. For example, you'll find -the Python library's def.hpp header in

      +boost\, named after the library. For example, you'll find +the Python library's def.hpp header in

      -boost\python\def.hpp.
      +boost\python\def.hpp.
       
    • -
    • Some libraries have an “aggregate header” in boost\ that -#includes all of the library's other headers. For +

    • 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

      -boost\python.hpp.
      +boost\python.hpp.
       
    • Most libraries place private headers in a subdirectory called -detail\, or aux_\. Don't expect to find +detail\, or aux_\. Don't expect to find 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_42_0) is -sometimes referred to as $BOOST_ROOT in documentation and +

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

    3. To compile anything in Boost, you need a directory containing -the boost\ subdirectory in your #include path. Specific steps for setting up #include +the boost\ subdirectory in your #include path. Specific steps for setting up #include paths in Microsoft Visual Studio follow later in this document; if you use another IDE, please consult your product's documentation for instructions.

    4. -
    5. Since all of Boost's header files have the .hpp extension, -and live in the boost\ subdirectory of the boost root, your -Boost #include directives will look like:

      +
    6. Since all of Boost's header files have the .hpp extension, +and live in the boost\ subdirectory of the boost root, your +Boost #include directives will look like:

       #include <boost/whatever.hpp>
       
      @@ -151,11 +151,11 @@ Boost #include directives will look like:

      depending on your preference regarding the use of angle bracket includes. Even Windows users can (and, for portability reasons, probably should) use forward slashes in -#include directives; your compiler doesn't care.

      +#include directives; your compiler doesn't care.

    7. -
    8. Don't be distracted by the doc\ subdirectory; it only +

    9. Don't be distracted by the doc\ subdirectory; it only contains a subset of the Boost documentation. Start with -libs\index.html if you're looking for the whole enchilada.

      +libs\index.html if you're looking for the whole enchilada.

    @@ -163,7 +163,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.

    @@ -191,7 +191,7 @@ before building and installing it)

    A few libraries have optional separately-compiled binaries:

    • Boost.DateTime has a binary component that is only needed if -you're using its to_string/from_string or serialization +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.
    • @@ -204,7 +204,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 @@ -224,7 +224,7 @@ int main() in(std::cin), in(), std::cout << (_1 * 3) << " " ); } -

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

    +

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

    Note

    To build the examples in this guide, you can use an @@ -253,14 +253,14 @@ cd path\to\some\directory

    followed by Return. For example,

    -cd C:\Program Files\boost\boost_1_42_0
    +cd C:\Program Files\boost\boost_1_43_0
     

    Long commands can be continued across several lines by typing a -caret (^) at the end of all but the last line. Some examples +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…

    • @@ -278,14 +278,14 @@ 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_42_0

      +

      C:\Program Files\boost\boost_1_43_0

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

    • -
    • Replace the contents of the example.cpp generated by the IDE +

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

    • From the Build menu, select Build Solution.

      @@ -301,7 +301,7 @@ Return key.

      skip to the next step

    -

    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 @@ -340,21 +340,21 @@ 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_42_0\lib\. If you installed +install pre-compiled binaries into the lib\ subdirectory of the +boost root, typically C:\Program Files\boost\boost_1_43_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

    -

    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 @@ -366,10 +366,10 @@ 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 -of options that can be passed to bjam.

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

    @@ -383,22 +383,22 @@ separately. See the Boost.Build is a text-based system for developing, testing, and installing software. To use it, you'll need an executable called -bjam.

    +bjam.

    -

    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 +

    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 +

    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.

    +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 Boost.Build documentation).

    @@ -422,70 +422,70 @@ Name
    - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -500,17 +500,17 @@ are using the msvc or gcc toolsets, which have special version detection code) or auto-linking will fail.

    -

    5.3.3   Select a Build Directory

    +

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

    +invoke bjam as follows:

     bjam --build-dir=build-directory toolset=toolset-name --build-type=complete stage
     
    @@ -518,30 +518,30 @@ bjam --build-dir=Boost.Build documentation.

    For example, your session might look like this:4

    -C:\WINDOWS> cd C:\Program Files\boost\boost_1_42_0
    -C:\Program Files\boost\boost_1_42_0> bjam ^
    +C:\WINDOWS> cd C:\Program Files\boost\boost_1_43_0
    +C:\Program Files\boost\boost_1_43_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 ^, -More? and quotation marks (") in that line.

    -

    The option “--build-type=complete” causes bjam to build +

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

    -

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

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

    Note

    -

    bjam is case-sensitive; it is important that all the +

    bjam is case-sensitive; it is important that all the parts shown in bold type above be entirely lower-case.

    For a description of other options you can pass when invoking -bjam, type:

    +bjam, type:

     bjam --help
     
    @@ -550,20 +550,20 @@ be interested in:

    • reviewing the list of library names with --show-libraries
    • limiting which libraries get built with the --with-library-name or --without-library-name options
    • -
    • choosing a specific build variant by adding release or -debug to the command line.
    • +
    • choosing a specific build variant by adding release or +debug to the command line.

    Note

    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

      @@ -587,7 +587,7 @@ 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 @@ -604,7 +604,7 @@ for your compiler to the -

    6   Link Your Program to a Boost Library

    +

    6   Link Your Program to a Boost Library

    To demonstrate linking with a Boost binary library, we'll use the following simple program that extracts the subject lines from emails. It uses the Boost.Regex library, which has a @@ -649,7 +649,7 @@ GCC users should refer to the -

    6.1   Link From Within the Visual Studio IDE

    +

    6.1   Link From Within the Visual Studio IDE

    Starting with the header-only example project we created earlier:

      @@ -657,24 +657,24 @@ earlier:

      select Properties from the resulting pop-up menu
    1. In Configuration Properties > Linker > Additional Library Directories, enter the path to the Boost binaries, -e.g. C:\Program Files\boost\boost_1_42_0\lib\.
    2. +e.g. C:\Program Files\boost\boost_1_43_0\lib\.
    3. From the Build menu, select Build Solution.

    skip to the next step

    -

    6.3   Library Naming

    +

    6.3   Library Naming

    Note

    If, like Visual C++, your compiler supports auto-linking, @@ -692,13 +692,13 @@ how it was built. For example, libboost_regex-vc71-mt-d-1_34.lib can be broken down into the following elements:

    -
    lib
    +
    lib
    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 +libraries use the lib prefix; import libraries and DLLs do not.6
    -
    boost_regex
    -
    Library name: all boost library filenames begin with boost_.
    +
    boost_regex
    +
    Library name: all boost library filenames begin with boost_.
    -vc71
    Toolset tag: identifies the toolset and version used to build the binary.
    @@ -714,34 +714,38 @@ feature, a single letter is added to the tag:

    [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.
    acc
    acc Hewlett Packard Only very recent versions are known to work well with Boost
    borland
    borland Borland  
    como
    como Comeau Computing Using this toolset may require configuring another toolset to act as its backend
    cw
    cw Metrowerks/Freescale The CodeWarrior compiler. We have not tested versions of this compiler produced since it was sold to Freescale.
    dmc
    dmc Digital Mars As of this Boost release, no version of dmc is known to handle Boost well.
    darwin
    darwin Apple Computer Apple's version of the GCC toolchain with support for Darwin and MacOS X features such as frameworks.
    gcc
    gcc The Gnu Project Includes support for Cygwin and MinGW compilers.
    hp_cxx
    hp_cxx Hewlett Packard Targeted at the Tru64 operating system.
    intel
    intel Intel  
    msvc
    msvc Microsoft  
    qcc
    qcc QNX Software Systems  
    sun
    sun Sun Only very recent versions are known to work well with Boost.
    vacpp
    vacpp IBM The VisualAge C++ compiler.
    --+++ + - + + - + + - + + - + + - + - - - +
    Key Use this library when:Boost.Build option
    s
    s linking statically to the C++ standard library and compiler runtime support libraries.runtime-link=static
    g
    g using debug versions of the standard and runtime support libraries.runtime-debugging=on
    y
    y using a special debug build of Python.python-debugging=on
    d
    d building a debug version of your code.7variant=debug
    p
    p using the STLPort standard library rather than the default one supplied with your compiler.
    nusing STLPort's deprecated “native iostreams” feature.8stdlib=stlport
    @@ -756,12 +760,12 @@ ABI tag is ommitted.

    Version tag: the full Boost release number, with periods replaced by underscores. For example, version 1.31.1 would be tagged as "-1_31_1".
    -
    .lib
    +
    .lib
    Extension: determined according to the operating system's usual convention. On most unix-style platforms the extensions are -.a and .so for static libraries (archives) and shared -libraries, respectively. On Windows, .dll indicates a shared -library and .lib indicates a +.a and .so for static libraries (archives) and shared +libraries, respectively. On Windows, .dll indicates a shared +library and .lib indicates a static or import library. Where supported by toolsets on unix variants, a full version extension is added (e.g. ".so.1.34") and a symbolic link to the library file, named without the trailing @@ -773,9 +777,9 @@ 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:

    +file. Copy it out of your browser and save it as jayne.txt:

     To: George Shmidlap
     From: Rita Marlowe
    @@ -795,7 +799,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 @@ -824,7 +828,7 @@ mailing list.

    [1]We recommend -downloading boost_1_42_0.7z and using 7-Zip to decompress +downloading boost_1_43_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. @@ -835,7 +839,7 @@ built-in decompression as it can be painfully slow for large archives. [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. +selected by default), you won't see the libs/ subdirectory. That won't affect your ability to use precompiled binaries, but you won't be able to rebuild libraries from scratch. @@ -852,21 +856,21 @@ used in the examples. - @@ -909,7 +913,7 @@ compiled code, you can't count on that with Boost libraries.
    [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 -More? to prompt for more input. Feel free to omit the +More? to prompt for more input. Feel free to omit the carets and subsequent newlines; we used them so the example would fit on a page of reasonable width.

    The command prompt treats each bit of whitespace in the command -as an argument separator. That means quotation marks (") +as an argument separator. That means quotation marks (") are required to keep text together whenever a single command-line argument contains spaces, as in

     --build-dir="C:\Documents_and_Settings\dave\build-boost"
     
    -

    Also, for example, you can't add spaces around the = sign as in

    +

    Also, for example, you can't add spaces around the = sign as in

     --build-dir_=_"C:\Documents and Settings\dave\build-boost"
     
    @@ -901,7 +905,7 @@ same name.
    [7]These libraries were compiled without optimization or inlining, with full debug symbols enabled, and without -NDEBUG #defined. Although it's true that sometimes +NDEBUG #defined. Although it's true that sometimes these choices don't affect binary compatibility with other compiled code, you can't count on that with Boost libraries.
    - -- cgit v1.2.1
    [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.