diff --git a/getting_started/unix-variants.html b/getting_started/unix-variants.html index 4ca0261..5ec9d54 100644 --- a/getting_started/unix-variants.html +++ b/getting_started/unix-variants.html @@ -534,14 +534,14 @@ project.
You can specify the full path to each library:
$ c++ -I path/to/boost_1_34_0 example.cpp -o example \
- ~/boost/lib/libboost_regex-gcc-3.4-mt-d-1_34.a
+ ~/boost/lib/libboost_regex-gcc34-mt-d-1_34.a
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_34_0 example.cpp -o example \
- -L~/boost/lib/ -lboost_regex-gcc-3.4-mt-d-1_34
+ -L~/boost/lib/ -lboost_regex-gcc34-mt-d-1_34
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/unix-variants.rst b/getting_started/unix-variants.rst index 9c1b752..4cf74c4 100644 --- a/getting_started/unix-variants.rst +++ b/getting_started/unix-variants.rst @@ -153,7 +153,7 @@ A. You can specify the full path to each library: .. parsed-literal:: $ c++ -I |root| example.cpp -o example **\\** - **~/boost/lib/libboost_regex-gcc-3.4-mt-d-1_34.a** + **~/boost/lib/libboost_regex-gcc34-mt-d-1_34.a** B. You can separately specify a directory to search (with ``-L``\ *directory*) and a library name to search for (with ``-l``\ @@ -163,7 +163,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-gcc-3.4-mt-d-1_34** + **-L~/boost/lib/ -lboost_regex-gcc34-mt-d-1_34** 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 83145d2..e816a89 100644 --- a/getting_started/windows.html +++ b/getting_started/windows.html @@ -26,40 +26,40 @@ not supported—they may or may not work.
Index
The easiest way to get a copy of Boost is to use the installer provided by Boost Consulting. We especially recommend this method if you use Microsoft Visual Studio .NET 2003 or Microsoft @@ -76,7 +76,7 @@ distribution.1
This is a sketch of the resulting directory structure:
boost_1_34_0\ .................The “boost root directory” @@ -159,7 +159,7 @@ contains a subset of the Boost documentation. Start with
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.
To keep things simple, let's start by using a header-only library. The following program reads a sequence of integers from standard input, uses Boost.Lambda to multiply each number by three, and @@ -255,7 +255,7 @@ caret (^) at the end on this page use that technique to save horizontal space.
From Visual Studio's File menu, select New > Project…
From your computer's Start menu, if you are a Visual Studio 2005 user, select
@@ -322,7 +322,7 @@ echo 1 2 3 | example
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
@@ -335,11 +335,11 @@ correctly identified the
- If you want to use any of the separately-compiled Boost libraries,
you'll need to acquire library binaries. The installer supplied by Boost Consulting will download and
install pre-compiled binaries into the lib\ subdirectory of the
boost root, typically C:\Program Files\boost\boost_1_34_0\lib\. If you installed
@@ -349,7 +349,7 @@ now. 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. bjam is the command-line tool that drives the Boost Build
system. To build Boost binaries, you'll invoke bjam from the
Boost root. First, find the toolset corresponding to your compiler in the
following table. 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
@@ -483,7 +483,7 @@ default Boost.Build will create a
Change your current directory to the Boost root directory and
invoke bjam as follows: For example, your session might look like this:4 During the process of building Boost libraries, you can expect to
see some messages printed on the console. These may include 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
@@ -565,7 +565,7 @@ questions about configuring Boost for your compiler to the
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
@@ -599,15 +599,18 @@ project.
Auto-Linking Most Windows compilers and linkers have so-called “auto-linking
+ Most Windows compilers and linkers have so-called “auto-linking
support,” which eliminates the second challenge. Special code in
Boost header files detects your compiler options and uses that
information to encode the name of the correct library into your
object files; the linker selects the library with that name from
the directories you've told it to search. The GCC toolchains (Cygwin and MinGW) are notable exceptions;
+GCC users should refer to the linking instructions for Unix
+variant OSes for the appropriate command-line options to use. Starting with the header-only example project we created
earlier: For example, we can compile and link the above program from the
Visual C++ command-line by simply adding the bold text below to
the command line we used earlier, assuming your Boost binaries are
@@ -632,7 +635,7 @@ cl /EHsc /I path\to\boos
Note If, like Visual C++, your compiler supports auto-linking,
@@ -654,7 +657,7 @@ following elements: To test our subject extraction, we'll filter the following text
file. Copy it out of your browser and save it as jayne.txt: 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
@@ -834,7 +837,7 @@ have any source code mechanism for suppressing warnings.
5 Prepare to Use a Boost Library Binary
+5 Prepare to Use a Boost Library Binary
5.1 Install Visual Studio (2005 or .NET 2003) Binaries
+5.1 Install Visual Studio (2005 or .NET 2003) Binaries
5.2 Or, Build Binaries From Source
+5.2 Or, Build Binaries From Source
5.2.1 Get bjam
+5.2.1 Get bjam
5.2.2 Identify Your Toolset
+5.2.2 Identify Your Toolset
5.2.3 Select a Build Directory
+5.2.3 Select a Build Directory
5.2.4 Invoke bjam
+5.2.4 Invoke bjam
@@ -491,7 +491,7 @@ bjam --build-dir=
-C:WINDOWS> cd C:\Program Files\boost\boost_1_34_0
+C:\WINDOWS> cd C:\Program Files\boost\boost_1_34_0
C:\Program Files\boost\boost_1_34_0> bjam ^
More? --build-dir=%TEMP%\build-boost ^
More? --toolset=msvc stage
@@ -523,7 +523,7 @@ be interested in:
5.3 Expected Build Output
+5.3 Expected Build Output
@@ -547,7 +547,7 @@ look something like:
5.4 In Case of Build Errors
+5.4 In Case of Build Errors
6 Link Your Program to a Boost Library
+6 Link Your Program to a Boost Library
6.1 Link From Within the Visual Studio IDE
+6.1 Link From Within the Visual Studio IDE
@@ -621,7 +624,7 @@ e.g. C:\Program skip to the next step
6.2 Or, Link From the Command Prompt
+6.2 Or, Link From the Command Prompt
6.3 Library Naming
+6.3 Library Naming
using a special debug build of Python.
d
-building a debug version of your code.7
+building a debug version of your code.7
p
using the STLPort standard library rather than the default one supplied with
your compiler.
@@ -732,7 +735,7 @@ version number, will also be created.
n
-using STLPort's deprecated “native iostreams” feature.8
+using STLPort's deprecated “native iostreams” feature.8
6.4 Test Your Program
+6.4 Test Your Program
@@ -754,7 +757,7 @@ Spoil Rock Hunter?”
7 Conclusion and Further Resources
+7 Conclusion and Further Resources
[6] This convention distinguishes the static version of
+
@@ -843,7 +846,7 @@ same name.
[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
@@ -853,7 +856,7 @@ compiled code, you can't count on that with Boost libraries.
[8] This feature of STLPort is deprecated because it's
+
diff --git a/getting_started/windows.rst b/getting_started/windows.rst
index b512faf..07dd316 100644
--- a/getting_started/windows.rst
+++ b/getting_started/windows.rst
@@ -199,7 +199,7 @@ For example, your session might look like this: [#continuation]_
.. parsed-literal::
- C:\WINDOWS> cd |default-root|
+ C:\\WINDOWS> cd |default-root|
|default-root|> bjam **^**
More? **--build-dir=**\ %TEMP%\\build-boost **^**
More? **--toolset=**\ msvc stage
@@ -219,6 +219,13 @@ For example, your session might look like this: [#continuation]_
object files; the linker selects the library with that name from
the directories you've told it to search.
+ The GCC toolchains (Cygwin and MinGW) are notable exceptions;
+ GCC users should refer to the `linking instructions for Unix
+ variant OSes`__ for the appropriate command-line options to use.
+
+__ unix-variants.html#link-your-program-to-a-boost-library
+
+
Link From Within the Visual Studio IDE
--------------------------------------
[8] This feature of STLPort is deprecated because it's
impossible to make it work transparently to the user; we don't
recommend it.