cvs diff: Diffing more
cvs diff: Diffing more/css_0
cvs diff: Diffing more/getting_started
RCS file: /cvsroot/boost/boost/more/getting_started/unix-variants.html,v
retrieving revision 1.4.2.4
diff -d -d -u -r1.4.2.4 unix-variants.html
|
|
|
|
| 534 | 534 | <li><p class="first">You can specify the full path to each library:</p> |
| 535 | 535 | <pre class="literal-block"> |
| 536 | 536 | $ c++ -I <em>path/to/</em><tt class="docutils literal"><span class="pre">boost_1_34_0</span></tt> example.cpp -o example <strong>\</strong> |
| 537 | | <strong>~/boost/lib/libboost_regex-gcc-3.4-mt-d-1_34.a</strong> |
| | 537 | <strong>~/boost/lib/libboost_regex-gcc34-mt-d-1_34.a</strong> |
| 538 | 538 | </pre> |
| 539 | 539 | </li> |
| 540 | 540 | <li><p class="first">You can separately specify a directory to search (with <tt class="docutils literal"><span class="pre">-L</span></tt><em>directory</em>) and a library name to search for (with <tt class="docutils literal"><span class="pre">-l</span></tt><em>library</em>,<a class="footnote-reference" href="#lowercase-l" id="id12"><sup>2</sup></a> dropping the filename's leading <tt class="docutils literal"><span class="pre">lib</span></tt> and trailing |
| 541 | 541 | suffix (<tt class="docutils literal"><span class="pre">.a</span></tt> in this case):</p> |
| 542 | 542 | <pre class="literal-block"> |
| 543 | 543 | $ c++ -I <em>path/to/</em><tt class="docutils literal"><span class="pre">boost_1_34_0</span></tt> example.cpp -o example <strong>\</strong> |
| 544 | | <strong>-L~/boost/lib/ -lboost_regex-gcc-3.4-mt-d-1_34</strong> |
| | 544 | <strong>-L~/boost/lib/ -lboost_regex-gcc34-mt-d-1_34</strong> |
| 545 | 545 | </pre> |
| 546 | 546 | <p>As you can see, this method is just as terse as method A for one |
| 547 | 547 | library; it <em>really</em> pays off when you're using multiple |
RCS file: /cvsroot/boost/boost/more/getting_started/unix-variants.rst,v
retrieving revision 1.1.2.2
diff -d -d -u -r1.1.2.2 unix-variants.rst
|
|
|
|
| 153 | 153 | .. parsed-literal:: |
| 154 | 154 | |
| 155 | 155 | $ c++ -I |root| example.cpp -o example **\\** |
| 156 | | **~/boost/lib/libboost_regex-gcc-3.4-mt-d-1_34.a** |
| | 156 | **~/boost/lib/libboost_regex-gcc34-mt-d-1_34.a** |
| 157 | 157 | |
| 158 | 158 | B. You can separately specify a directory to search (with ``-L``\ |
| 159 | 159 | *directory*) and a library name to search for (with ``-l``\ |
| … |
… |
|
| 163 | 163 | .. parsed-literal:: |
| 164 | 164 | |
| 165 | 165 | $ c++ -I |root| example.cpp -o example **\\** |
| 166 | | **-L~/boost/lib/ -lboost_regex-gcc-3.4-mt-d-1_34** |
| | 166 | **-L~/boost/lib/ -lboost_regex-gcc34-mt-d-1_34** |
| 167 | 167 | |
| 168 | 168 | As you can see, this method is just as terse as method A for one |
| 169 | 169 | library; it *really* pays off when you're using multiple |
RCS file: /cvsroot/boost/boost/more/getting_started/windows.html,v
retrieving revision 1.4.2.4
diff -d -d -u -r1.4.2.4 windows.html
|
|
|
|
| 26 | 26 | <div class="contents topic" id="index"> |
| 27 | 27 | <p class="topic-title first">Index</p> |
| 28 | 28 | <ul class="auto-toc simple"> |
| 29 | | <li><a class="reference internal" href="#get-boost" id="id22">1 Get Boost</a></li> |
| 30 | | <li><a class="reference internal" href="#the-boost-distribution" id="id23">2 The Boost Distribution</a></li> |
| 31 | | <li><a class="reference internal" href="#header-only-libraries" id="id24">3 Header-Only Libraries</a></li> |
| 32 | | <li><a class="reference internal" href="#build-a-simple-program-using-boost" id="id25">4 Build a Simple Program Using Boost</a><ul class="auto-toc"> |
| 33 | | <li><a class="reference internal" href="#build-from-the-visual-studio-ide" id="id26">4.1 Build From the Visual Studio IDE</a></li> |
| 34 | | <li><a class="reference internal" href="#or-build-from-the-command-prompt" id="id27">4.2 Or, Build From the Command Prompt</a></li> |
| 35 | | <li><a class="reference internal" href="#errors-and-warnings" id="id28">4.3 Errors and Warnings</a></li> |
| | 29 | <li><a class="reference internal" href="#get-boost" id="id23">1 Get Boost</a></li> |
| | 30 | <li><a class="reference internal" href="#the-boost-distribution" id="id24">2 The Boost Distribution</a></li> |
| | 31 | <li><a class="reference internal" href="#header-only-libraries" id="id25">3 Header-Only Libraries</a></li> |
| | 32 | <li><a class="reference internal" href="#build-a-simple-program-using-boost" id="id26">4 Build a Simple Program Using Boost</a><ul class="auto-toc"> |
| | 33 | <li><a class="reference internal" href="#build-from-the-visual-studio-ide" id="id27">4.1 Build From the Visual Studio IDE</a></li> |
| | 34 | <li><a class="reference internal" href="#or-build-from-the-command-prompt" id="id28">4.2 Or, Build From the Command Prompt</a></li> |
| | 35 | <li><a class="reference internal" href="#errors-and-warnings" id="id29">4.3 Errors and Warnings</a></li> |
| 36 | 36 | </ul> |
| 37 | 37 | </li> |
| 38 | | <li><a class="reference internal" href="#prepare-to-use-a-boost-library-binary" id="id29">5 Prepare to Use a Boost Library Binary</a><ul class="auto-toc"> |
| 39 | | <li><a class="reference internal" href="#install-visual-studio-2005-or-net-2003-binaries" id="id30">5.1 Install Visual Studio (2005 or .NET 2003) Binaries</a></li> |
| 40 | | <li><a class="reference internal" href="#or-build-binaries-from-source" id="id31">5.2 Or, Build Binaries From Source</a><ul class="auto-toc"> |
| 41 | | <li><a class="reference internal" href="#get-bjam" id="id32">5.2.1 Get <tt class="docutils literal"><span class="pre">bjam</span></tt></a></li> |
| 42 | | <li><a class="reference internal" href="#identify-your-toolset" id="id33">5.2.2 Identify Your Toolset</a></li> |
| 43 | | <li><a class="reference internal" href="#select-a-build-directory" id="id34">5.2.3 Select a Build Directory</a></li> |
| 44 | | <li><a class="reference internal" href="#invoke-bjam" id="id35">5.2.4 Invoke <tt class="docutils literal"><span class="pre">bjam</span></tt></a></li> |
| | 38 | <li><a class="reference internal" href="#prepare-to-use-a-boost-library-binary" id="id30">5 Prepare to Use a Boost Library Binary</a><ul class="auto-toc"> |
| | 39 | <li><a class="reference internal" href="#install-visual-studio-2005-or-net-2003-binaries" id="id31">5.1 Install Visual Studio (2005 or .NET 2003) Binaries</a></li> |
| | 40 | <li><a class="reference internal" href="#or-build-binaries-from-source" id="id32">5.2 Or, Build Binaries From Source</a><ul class="auto-toc"> |
| | 41 | <li><a class="reference internal" href="#get-bjam" id="id33">5.2.1 Get <tt class="docutils literal"><span class="pre">bjam</span></tt></a></li> |
| | 42 | <li><a class="reference internal" href="#identify-your-toolset" id="id34">5.2.2 Identify Your Toolset</a></li> |
| | 43 | <li><a class="reference internal" href="#select-a-build-directory" id="id35">5.2.3 Select a Build Directory</a></li> |
| | 44 | <li><a class="reference internal" href="#invoke-bjam" id="id36">5.2.4 Invoke <tt class="docutils literal"><span class="pre">bjam</span></tt></a></li> |
| 45 | 45 | </ul> |
| 46 | 46 | </li> |
| 47 | | <li><a class="reference internal" href="#expected-build-output" id="id36">5.3 Expected Build Output</a></li> |
| 48 | | <li><a class="reference internal" href="#in-case-of-build-errors" id="id37">5.4 In Case of Build Errors</a></li> |
| | 47 | <li><a class="reference internal" href="#expected-build-output" id="id37">5.3 Expected Build Output</a></li> |
| | 48 | <li><a class="reference internal" href="#in-case-of-build-errors" id="id38">5.4 In Case of Build Errors</a></li> |
| 49 | 49 | </ul> |
| 50 | 50 | </li> |
| 51 | | <li><a class="reference internal" href="#link-your-program-to-a-boost-library" id="id38">6 Link Your Program to a Boost Library</a><ul class="auto-toc"> |
| 52 | | <li><a class="reference internal" href="#link-from-within-the-visual-studio-ide" id="id39">6.1 Link From Within the Visual Studio IDE</a></li> |
| 53 | | <li><a class="reference internal" href="#or-link-from-the-command-prompt" id="id40">6.2 Or, Link From the Command Prompt</a></li> |
| 54 | | <li><a class="reference internal" href="#library-naming" id="id41">6.3 Library Naming</a></li> |
| 55 | | <li><a class="reference internal" href="#test-your-program" id="id42">6.4 Test Your Program</a></li> |
| | 51 | <li><a class="reference internal" href="#link-your-program-to-a-boost-library" id="id39">6 Link Your Program to a Boost Library</a><ul class="auto-toc"> |
| | 52 | <li><a class="reference internal" href="#link-from-within-the-visual-studio-ide" id="id40">6.1 Link From Within the Visual Studio IDE</a></li> |
| | 53 | <li><a class="reference internal" href="#or-link-from-the-command-prompt" id="id41">6.2 Or, Link From the Command Prompt</a></li> |
| | 54 | <li><a class="reference internal" href="#library-naming" id="id42">6.3 Library Naming</a></li> |
| | 55 | <li><a class="reference internal" href="#test-your-program" id="id43">6.4 Test Your Program</a></li> |
| 56 | 56 | </ul> |
| 57 | 57 | </li> |
| 58 | | <li><a class="reference internal" href="#conclusion-and-further-resources" id="id43">7 Conclusion and Further Resources</a></li> |
| | 58 | <li><a class="reference internal" href="#conclusion-and-further-resources" id="id44">7 Conclusion and Further Resources</a></li> |
| 59 | 59 | </ul> |
| 60 | 60 | </div> |
| 61 | 61 | <div class="section" id="get-boost"> |
| 62 | | <h1><a class="toc-backref" href="#id22">1 Get Boost</a></h1> |
| | 62 | <h1><a class="toc-backref" href="#id23">1 Get Boost</a></h1> |
| 63 | 63 | <p>The easiest way to get a copy of Boost is to use the <a class="reference external" href="http://www.boost-consulting.com/download/windows">installer</a> |
| 64 | 64 | provided by <a class="reference external" href="http://www.boost-consulting.com">Boost Consulting</a>. We especially recommend this |
| 65 | 65 | method if you use Microsoft Visual Studio .NET 2003 or Microsoft |
| … |
… |
|
| 76 | 76 | <!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) --> |
| 77 | 77 | </div> |
| 78 | 78 | <div class="section" id="the-boost-distribution"> |
| 79 | | <h1><a class="toc-backref" href="#id23">2 The Boost Distribution</a></h1> |
| | 79 | <h1><a class="toc-backref" href="#id24">2 The Boost Distribution</a></h1> |
| 80 | 80 | <p>This is a sketch of the resulting directory structure:</p> |
| 81 | 81 | <pre class="literal-block"> |
| 82 | 82 | <strong>boost_1_34_0</strong><strong>\</strong> .................<em>The “boost root directory”</em> |
| … |
… |
|
| 159 | 159 | <!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) --> |
| 160 | 160 | </div> |
| 161 | 161 | <div class="section" id="header-only-libraries"> |
| 162 | | <h1><a class="toc-backref" href="#id24">3 Header-Only Libraries</a></h1> |
| | 162 | <h1><a class="toc-backref" href="#id25">3 Header-Only Libraries</a></h1> |
| 163 | 163 | <p>The first thing many people want to know is, “how do I build |
| 164 | 164 | Boost?” The good news is that often, there's nothing to build.</p> |
| 165 | 165 | <div class="admonition-nothing-to-build admonition"> |
| … |
… |
|
| 199 | 199 | <!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) --> |
| 200 | 200 | </div> |
| 201 | 201 | <div class="section" id="build-a-simple-program-using-boost"> |
| 202 | | <h1><a class="toc-backref" href="#id25">4 Build a Simple Program Using Boost</a></h1> |
| | 202 | <h1><a class="toc-backref" href="#id26">4 Build a Simple Program Using Boost</a></h1> |
| 203 | 203 | <p>To keep things simple, let's start by using a header-only library. |
| 204 | 204 | The following program reads a sequence of integers from standard |
| 205 | 205 | input, uses Boost.Lambda to multiply each number by three, and |
| … |
… |
|
| 255 | 255 | on this page use that technique to save horizontal space.</p> |
| 256 | 256 | </div> |
| 257 | 257 | <div class="section" id="build-from-the-visual-studio-ide"> |
| 258 | | <span id="vs-header-only"></span><h2><a class="toc-backref" href="#id26">4.1 Build From the Visual Studio IDE</a></h2> |
| | 258 | <span id="vs-header-only"></span><h2><a class="toc-backref" href="#id27">4.1 Build From the Visual Studio IDE</a></h2> |
| 259 | 259 | <ul> |
| 260 | 260 | <li><p class="first">From Visual Studio's <em>File</em> menu, select <em>New</em> > <em>Project…</em></p> |
| 261 | 261 | </li> |
| … |
… |
|
| 296 | 296 | <p><a class="reference internal" href="#errors-and-warnings"><em>skip to the next step</em></a></p> |
| 297 | 297 | </div> |
| 298 | 298 | <div class="section" id="or-build-from-the-command-prompt"> |
| 299 | | <h2><a class="toc-backref" href="#id27">4.2 Or, Build From the Command Prompt</a></h2> |
| | 299 | <h2><a class="toc-backref" href="#id28">4.2 Or, Build From the Command Prompt</a></h2> |
| 300 | 300 | <p>From your computer's <em>Start</em> menu, if you are a Visual |
| 301 | 301 | Studio 2005 user, select</p> |
| 302 | 302 | <blockquote> |
| … |
… |
|
| 322 | 322 | <!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) --> |
| 323 | 323 | </div> |
| 324 | 324 | <div class="section" id="errors-and-warnings"> |
| 325 | | <h2><a class="toc-backref" href="#id28">4.3 Errors and Warnings</a></h2> |
| | 325 | <h2><a class="toc-backref" href="#id29">4.3 Errors and Warnings</a></h2> |
| 326 | 326 | <p>Don't be alarmed if you see compiler warnings originating in Boost |
| 327 | 327 | headers. We try to eliminate them, but doing so isn't always |
| 328 | 328 | practical.<a class="footnote-reference" href="#warnings" id="id7"><sup>5</sup></a> <strong>Errors are another matter</strong>. If you're |
| … |
… |
|
| 335 | 335 | </div> |
| 336 | 336 | </div> |
| 337 | 337 | <div class="section" id="prepare-to-use-a-boost-library-binary"> |
| 338 | | <h1><a class="toc-backref" href="#id29">5 Prepare to Use a Boost Library Binary</a></h1> |
| | 338 | <h1><a class="toc-backref" href="#id30">5 Prepare to Use a Boost Library Binary</a></h1> |
| 339 | 339 | <p>If you want to use any of the separately-compiled Boost libraries, |
| 340 | 340 | you'll need to acquire library binaries.</p> |
| 341 | 341 | <div class="section" id="install-visual-studio-2005-or-net-2003-binaries"> |
| 342 | | <h2><a class="toc-backref" href="#id30">5.1 Install Visual Studio (2005 or .NET 2003) Binaries</a></h2> |
| | 342 | <h2><a class="toc-backref" href="#id31">5.1 Install Visual Studio (2005 or .NET 2003) Binaries</a></h2> |
| 343 | 343 | <p>The <a class="reference external" href="http://www.boost-consulting.com/download/windows">installer</a> supplied by Boost Consulting will download and |
| 344 | 344 | install pre-compiled binaries into the <tt class="docutils literal"><span class="pre">lib\</span></tt> subdirectory of the |
| 345 | 345 | boost root, typically <tt class="docutils literal"><span class="pre">C:\Program</span> <span class="pre">Files\boost\</span></tt><tt class="docutils literal"><span class="pre">boost_1_34_0</span></tt><tt class="docutils literal"><span class="pre">\lib\</span></tt>. If you installed |
| … |
… |
|
| 349 | 349 | <p><a class="reference internal" href="#link-your-program-to-a-boost-library"><em>skip to the next step</em></a></p> |
| 350 | 350 | </div> |
| 351 | 351 | <div class="section" id="or-build-binaries-from-source"> |
| 352 | | <h2><a class="toc-backref" href="#id31">5.2 Or, Build Binaries From Source</a></h2> |
| | 352 | <h2><a class="toc-backref" href="#id32">5.2 Or, Build Binaries From Source</a></h2> |
| 353 | 353 | <p>If you're using an earlier version of Visual C++, or a compiler |
| 354 | 354 | from another vendor, you'll need to use <a class="reference external" href="../../tools/build/index.html">Boost.Build</a> to create your |
| 355 | 355 | own binaries.</p> |
| … |
… |
|
| 361 | 361 | <tt class="docutils literal"><span class="pre">bjam</span></tt>.</p> |
| 362 | 362 | <!-- .. _Boost.Jam documentation: Boost.Jam_ --> |
| 363 | 363 | <div class="section" id="get-bjam"> |
| 364 | | <h3><a class="toc-backref" href="#id32">5.2.1 Get <tt class="docutils literal"><span class="pre">bjam</span></tt></a></h3> |
| | 364 | <h3><a class="toc-backref" href="#id33">5.2.1 Get <tt class="docutils literal"><span class="pre">bjam</span></tt></a></h3> |
| 365 | 365 | <p><tt class="docutils literal"><span class="pre">bjam</span></tt> is the <a class="reference internal" href="#command-line-tool">command-line tool</a> that drives the Boost Build |
| 366 | 366 | system. To build Boost binaries, you'll invoke <tt class="docutils literal"><span class="pre">bjam</span></tt> from the |
| 367 | 367 | Boost root.</p> |
| … |
… |
|
| 370 | 370 | instructions</a>.</p> |
| 371 | 371 | </div> |
| 372 | 372 | <div class="section" id="identify-your-toolset"> |
| 373 | | <span id="toolset-name"></span><span id="toolset"></span><h3><a class="toc-backref" href="#id33">5.2.2 Identify Your Toolset</a></h3> |
| | 373 | <span id="toolset-name"></span><span id="toolset"></span><h3><a class="toc-backref" href="#id34">5.2.2 Identify Your Toolset</a></h3> |
| 374 | 374 | <p>First, find the toolset corresponding to your compiler in the |
| 375 | 375 | following table.</p> |
| 376 | 376 | <div class="note"> |
| … |
… |
|
| 475 | 475 | detection code) or <a class="reference internal" href="#auto-linking">auto-linking</a> will fail.</p> |
| 476 | 476 | </div> |
| 477 | 477 | <div class="section" id="select-a-build-directory"> |
| 478 | | <span id="id12"></span><span id="build-directory"></span><h3><a class="toc-backref" href="#id34">5.2.3 Select a Build Directory</a></h3> |
| | 478 | <span id="id12"></span><span id="build-directory"></span><h3><a class="toc-backref" href="#id35">5.2.3 Select a Build Directory</a></h3> |
| 479 | 479 | <p><a class="reference external" href="../../tools/build/index.html">Boost.Build</a> will place all intermediate files it generates while |
| 480 | 480 | building into the <strong>build directory</strong>. If your Boost root |
| 481 | 481 | directory is writable, this step isn't strictly necessary: by |
| … |
… |
|
| 483 | 483 | purpose in your current working directory.</p> |
| 484 | 484 | </div> |
| 485 | 485 | <div class="section" id="invoke-bjam"> |
| 486 | | <h3><a class="toc-backref" href="#id35">5.2.4 Invoke <tt class="docutils literal"><span class="pre">bjam</span></tt></a></h3> |
| | 486 | <h3><a class="toc-backref" href="#id36">5.2.4 Invoke <tt class="docutils literal"><span class="pre">bjam</span></tt></a></h3> |
| 487 | 487 | <p>Change your current directory to the Boost root directory and |
| 488 | 488 | invoke <tt class="docutils literal"><span class="pre">bjam</span></tt> as follows:</p> |
| 489 | 489 | <pre class="literal-block"> |
| … |
… |
|
| 491 | 491 | </pre> |
| 492 | 492 | <p>For example, your session might look like this:<a class="footnote-reference" href="#continuation" id="id13"><sup>4</sup></a></p> |
| 493 | 493 | <pre class="literal-block"> |
| 494 | | C:WINDOWS> cd <tt class="docutils literal"><span class="pre">C:\Program</span> <span class="pre">Files\boost\</span></tt><tt class="docutils literal"><span class="pre">boost_1_34_0</span></tt> |
| | 494 | C:\WINDOWS> cd <tt class="docutils literal"><span class="pre">C:\Program</span> <span class="pre">Files\boost\</span></tt><tt class="docutils literal"><span class="pre">boost_1_34_0</span></tt> |
| 495 | 495 | <tt class="docutils literal"><span class="pre">C:\Program</span> <span class="pre">Files\boost\</span></tt><tt class="docutils literal"><span class="pre">boost_1_34_0</span></tt>> bjam <strong>^</strong> |
| 496 | 496 | More? <strong>--build-dir=</strong>%TEMP%\build-boost <strong>^</strong> |
| 497 | 497 | More? <strong>--toolset=</strong>msvc stage |
| … |
… |
|
| 523 | 523 | </div> |
| 524 | 524 | </div> |
| 525 | 525 | <div class="section" id="expected-build-output"> |
| 526 | | <h2><a class="toc-backref" href="#id36">5.3 Expected Build Output</a></h2> |
| | 526 | <h2><a class="toc-backref" href="#id37">5.3 Expected Build Output</a></h2> |
| 527 | 527 | <p>During the process of building Boost libraries, you can expect to |
| 528 | 528 | see some messages printed on the console. These may include</p> |
| 529 | 529 | <ul> |
| … |
… |
|
| 547 | 547 | </ul> |
| 548 | 548 | </div> |
| 549 | 549 | <div class="section" id="in-case-of-build-errors"> |
| 550 | | <h2><a class="toc-backref" href="#id37">5.4 In Case of Build Errors</a></h2> |
| | 550 | <h2><a class="toc-backref" href="#id38">5.4 In Case of Build Errors</a></h2> |
| 551 | 551 | <p>The only error messages you see when building Boost—if any—should |
| 552 | 552 | be related to the IOStreams library's support of zip and bzip2 |
| 553 | 553 | formats as described <a class="reference external" href="../../libs/iostreams/doc/installation.html">here</a>. Install the relevant development |
| … |
… |
|
| 565 | 565 | </div> |
| 566 | 566 | </div> |
| 567 | 567 | <div class="section" id="link-your-program-to-a-boost-library"> |
| 568 | | <h1><a class="toc-backref" href="#id38">6 Link Your Program to a Boost Library</a></h1> |
| | 568 | <h1><a class="toc-backref" href="#id39">6 Link Your Program to a Boost Library</a></h1> |
| 569 | 569 | <p>To demonstrate linking with a Boost binary library, we'll use the |
| 570 | 570 | following simple program that extracts the subject lines from |
| 571 | 571 | emails. It uses the <a class="reference external" href="../../libs/regex/index.html">Boost.Regex</a> library, which has a |
| … |
… |
|
| 599 | 599 | </ol> |
| 600 | 600 | <div class="admonition-auto-linking admonition"> |
| 601 | 601 | <p class="first admonition-title">Auto-Linking</p> |
| 602 | | <p class="last">Most Windows compilers and linkers have so-called “auto-linking |
| | 602 | <p>Most Windows compilers and linkers have so-called “auto-linking |
| 603 | 603 | support,” which eliminates the second challenge. Special code in |
| 604 | 604 | Boost header files detects your compiler options and uses that |
| 605 | 605 | information to encode the name of the correct library into your |
| 606 | 606 | object files; the linker selects the library with that name from |
| 607 | 607 | the directories you've told it to search.</p> |
| | 608 | <p class="last">The GCC toolchains (Cygwin and MinGW) are notable exceptions; |
| | 609 | GCC users should refer to the <a class="reference external" href="unix-variants.html#link-your-program-to-a-boost-library">linking instructions for Unix |
| | 610 | variant OSes</a> for the appropriate command-line options to use.</p> |
| 608 | 611 | </div> |
| 609 | 612 | <div class="section" id="link-from-within-the-visual-studio-ide"> |
| 610 | | <h2><a class="toc-backref" href="#id39">6.1 Link From Within the Visual Studio IDE</a></h2> |
| | 613 | <h2><a class="toc-backref" href="#id40">6.1 Link From Within the Visual Studio IDE</a></h2> |
| 611 | 614 | <p>Starting with the <a class="reference internal" href="#vs-header-only">header-only example project</a> we created |
| 612 | 615 | earlier:</p> |
| 613 | 616 | <ol class="arabic simple"> |
| … |
… |
|
| 621 | 624 | <p><a class="reference internal" href="#test-your-program"><em>skip to the next step</em></a></p> |
| 622 | 625 | </div> |
| 623 | 626 | <div class="section" id="or-link-from-the-command-prompt"> |
| 624 | | <h2><a class="toc-backref" href="#id40">6.2 Or, Link From the Command Prompt</a></h2> |
| | 627 | <h2><a class="toc-backref" href="#id41">6.2 Or, Link From the Command Prompt</a></h2> |
| 625 | 628 | <p>For example, we can compile and link the above program from the |
| 626 | 629 | Visual C++ command-line by simply adding the <strong>bold</strong> text below to |
| 627 | 630 | the command line we used earlier, assuming your Boost binaries are |
| … |
… |
|
| 632 | 635 | </pre> |
| 633 | 636 | </div> |
| 634 | 637 | <div class="section" id="library-naming"> |
| 635 | | <h2><a class="toc-backref" href="#id41">6.3 Library Naming</a></h2> |
| | 638 | <h2><a class="toc-backref" href="#id42">6.3 Library Naming</a></h2> |
| 636 | 639 | <div class="note"> |
| 637 | 640 | <p class="first admonition-title">Note</p> |
| 638 | 641 | <p>If, like Visual C++, your compiler supports auto-linking, |
| … |
… |
|
| 654 | 657 | <dd><em>Prefix</em>: except on Microsoft Windows, every Boost library |
| 655 | 658 | name begins with this string. On Windows, only ordinary static |
| 656 | 659 | libraries use the <tt class="docutils literal"><span class="pre">lib</span></tt> prefix; import libraries and DLLs do |
| 657 | | not.<a class="footnote-reference" href="#distinct" id="id18"><sup>6</sup></a></dd> |
| | 660 | not.<a class="footnote-reference" href="#distinct" id="id19"><sup>6</sup></a></dd> |
| 658 | 661 | <dt><tt class="docutils literal"><span class="pre">boost_regex</span></tt></dt> |
| 659 | 662 | <dd><em>Library name</em>: all boost library filenames begin with <tt class="docutils literal"><span class="pre">boost_</span></tt>.</dd> |
| 660 | 663 | <dt><tt class="docutils literal"><span class="pre">-vc71</span></tt></dt> |
| … |
… |
|
| 692 | 695 | <td>using a special <a class="reference external" href="../../libs/python/doc/building.html#variants">debug build of Python</a>.</td> |
| 693 | 696 | </tr> |
| 694 | 697 | <tr><td><tt class="docutils literal"><span class="pre">d</span></tt></td> |
| 695 | | <td>building a debug version of your code.<a class="footnote-reference" href="#debug-abi" id="id19"><sup>7</sup></a></td> |
| | 698 | <td>building a debug version of your code.<a class="footnote-reference" href="#debug-abi" id="id20"><sup>7</sup></a></td> |
| 696 | 699 | </tr> |
| 697 | 700 | <tr><td><tt class="docutils literal"><span class="pre">p</span></tt></td> |
| 698 | 701 | <td>using the STLPort standard library rather than the default one supplied with |
| 699 | 702 | your compiler.</td> |
| 700 | 703 | </tr> |
| 701 | 704 | <tr><td><tt class="docutils literal"><span class="pre">n</span></tt></td> |
| 702 | | <td>using STLPort's deprecated “native iostreams” feature.<a class="footnote-reference" href="#native" id="id20"><sup>8</sup></a></td> |
| | 705 | <td>using STLPort's deprecated “native iostreams” feature.<a class="footnote-reference" href="#native" id="id21"><sup>8</sup></a></td> |
| 703 | 706 | </tr> |
| 704 | 707 | </tbody> |
| 705 | 708 | </table> |
| … |
… |
|
| 732 | 735 | <!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) --> |
| 733 | 736 | </div> |
| 734 | 737 | <div class="section" id="test-your-program"> |
| 735 | | <h2><a class="toc-backref" href="#id42">6.4 Test Your Program</a></h2> |
| | 738 | <h2><a class="toc-backref" href="#id43">6.4 Test Your Program</a></h2> |
| 736 | 739 | <p>To test our subject extraction, we'll filter the following text |
| 737 | 740 | file. Copy it out of your browser and save it as <tt class="docutils literal"><span class="pre">jayne.txt</span></tt>:</p> |
| 738 | 741 | <pre class="literal-block"> |
| … |
… |
|
| 754 | 757 | </div> |
| 755 | 758 | </div> |
| 756 | 759 | <div class="section" id="conclusion-and-further-resources"> |
| 757 | | <h1><a class="toc-backref" href="#id43">7 Conclusion and Further Resources</a></h1> |
| | 760 | <h1><a class="toc-backref" href="#id44">7 Conclusion and Further Resources</a></h1> |
| 758 | 761 | <p>This concludes your introduction to Boost and to integrating it |
| 759 | 762 | with your programs. As you start using Boost in earnest, there are |
| 760 | 763 | surely a few additional points you'll wish we had covered. One day |
| … |
… |
|
| 834 | 837 | <table class="docutils footnote" frame="void" id="distinct" rules="none"> |
| 835 | 838 | <colgroup><col class="label" /><col /></colgroup> |
| 836 | 839 | <tbody valign="top"> |
| 837 | | <tr><td class="label"><a class="fn-backref" href="#id18">[6]</a></td><td>This convention distinguishes the static version of |
| | 840 | <tr><td class="label"><a class="fn-backref" href="#id19">[6]</a></td><td>This convention distinguishes the static version of |
| 838 | 841 | a Boost library from the import library for an |
| 839 | 842 | identically-configured Boost DLL, which would otherwise have the |
| 840 | 843 | same name.</td></tr> |
| … |
… |
|
| 843 | 846 | <table class="docutils footnote" frame="void" id="debug-abi" rules="none"> |
| 844 | 847 | <colgroup><col class="label" /><col /></colgroup> |
| 845 | 848 | <tbody valign="top"> |
| 846 | | <tr><td class="label"><a class="fn-backref" href="#id19">[7]</a></td><td>These libraries were compiled without optimization |
| | 849 | <tr><td class="label"><a class="fn-backref" href="#id20">[7]</a></td><td>These libraries were compiled without optimization |
| 847 | 850 | or inlining, with full debug symbols enabled, and without |
| 848 | 851 | <tt class="docutils literal"><span class="pre">NDEBUG</span></tt> <tt class="docutils literal"><span class="pre">#define</span></tt>d. Although it's true that sometimes |
| 849 | 852 | these choices don't affect binary compatibility with other |
| … |
… |
|
| 853 | 856 | <table class="docutils footnote" frame="void" id="native" rules="none"> |
| 854 | 857 | <colgroup><col class="label" /><col /></colgroup> |
| 855 | 858 | <tbody valign="top"> |
| 856 | | <tr><td class="label"><a class="fn-backref" href="#id20">[8]</a></td><td>This feature of STLPort is deprecated because it's |
| | 859 | <tr><td class="label"><a class="fn-backref" href="#id21">[8]</a></td><td>This feature of STLPort is deprecated because it's |
| 857 | 860 | impossible to make it work transparently to the user; we don't |
| 858 | 861 | recommend it.</td></tr> |
| 859 | 862 | </tbody> |
RCS file: /cvsroot/boost/boost/more/getting_started/windows.rst,v
retrieving revision 1.2.2.2
diff -d -d -u -r1.2.2.2 windows.rst
|
|
|
|
| 199 | 199 | |
| 200 | 200 | .. parsed-literal:: |
| 201 | 201 | |
| 202 | | C:\WINDOWS> cd |default-root| |
| | 202 | C:\\WINDOWS> cd |default-root| |
| 203 | 203 | |default-root|> bjam **^** |
| 204 | 204 | More? **--build-dir=**\ %TEMP%\\build-boost **^** |
| 205 | 205 | More? **--toolset=**\ msvc stage |
| … |
… |
|
| 219 | 219 | object files; the linker selects the library with that name from |
| 220 | 220 | the directories you've told it to search. |
| 221 | 221 | |
| | 222 | The GCC toolchains (Cygwin and MinGW) are notable exceptions; |
| | 223 | GCC users should refer to the `linking instructions for Unix |
| | 224 | variant OSes`__ for the appropriate command-line options to use. |
| | 225 | |
| | 226 | __ unix-variants.html#link-your-program-to-a-boost-library |
| | 227 | |
| | 228 | |
| 222 | 229 | Link From Within the Visual Studio IDE |
| 223 | 230 | -------------------------------------- |
| 224 | 231 | |