<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.5: http://docutils.sourceforge.net/" />
<title>Boost Getting Started on Windows</title>
<link rel="stylesheet" href="../../rst.css" type="text/css" />
<link rel="icon" href="/favicon.ico" type="image/ico" /><link rel="stylesheet" type="text/css" href="/style/section-basic.css" /></head>
<body> <div id="boost-common-heading-doc">
<div id="heading-placard"></div>
<h1 id="heading-title"><a href="/"><img src="/gfx/space.png" alt=
"Boost C++ Libraries" id="heading-logo" /><span id="boost">Boost</span>
<span id="cpplibraries">C++ Libraries</span></a></h1>
<p id="heading-quote"><span class="quote">“...one of the most highly
regarded and expertly designed C++ library projects in the
world.”</span> <span class="attribution">— <a href=
"http://www.gotw.ca/" class="external">Herb Sutter</a> and <a href=
"http://en.wikipedia.org/wiki/Andrei_Alexandrescu" class="external">Andrei
Alexandrescu</a>, <a href=
"http://safari.awprofessional.com/?XmlId=0321113586" class="external">C++
Coding Standards</a></span></p>
<div id="heading-sections">
<ul>
<li id="welcome-section-tab"><a href="/">Welcome</a></li>
<li id="boost-section-tab"><a href="/users/">Introduction</a></li>
<li id="community-section-tab"><a href="/community/">Community</a></li>
<li id="development-section-tab"><a href=
"/development/">Development</a></li>
<li id="support-section-tab"><a href="/support/">Support</a></li>
<li id="doc-section-tab"><a href="/doc/">Documentation</a></li>
<li id="map-section-tab"><a href="/map.html">Index</a></li>
</ul>
</div>
</div>
<div id="boost-common-heading-doc-spacer"></div>
<div class="document" id="logo-getting-started-on-windows">
<h1 class="title"><a class="reference external" href="../../index.htm"><img alt="Boost" class="boost-logo" src="../../boost.png" /></a> Getting Started on Windows</h1>
<!-- Copyright David Abrahams 2006. Distributed under the Boost -->
<!-- Software License, Version 1.0. (See accompanying -->
<!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -->
<div class="admonition-a-note-to-cygwin-and-mingw-users admonition">
<p class="first admonition-title">A note to <a class="external" href="http://www.cygwin.com">Cygwin</a> and <a class="external" href="http://mingw.org">MinGW</a> users</p>
<p class="last">If you plan to use your tools from the Windows command prompt,
you're in the right place. If you plan to build from the <a class="external" href="http://www.cygwin.com">Cygwin</a>
bash shell, you're actually running on a POSIX platform and
should follow the instructions for <a class="reference external" href="unix-variants.html">getting started on Unix
variants</a>. Other command shells, such as <a class="external" href="http://mingw.org">MinGW</a>'s MSYS, are
not supported—they may or may not work.</p>
</div>
<div class="contents topic" id="index">
<p class="topic-title first">Index</p>
<ul class="auto-toc simple">
<li><a class="reference internal" href="#get-boost" id="id26">1 Get Boost</a></li>
<li><a class="reference internal" href="#the-boost-distribution" id="id27">2 The Boost Distribution</a></li>
<li><a class="reference internal" href="#header-only-libraries" id="id28">3 Header-Only Libraries</a></li>
<li><a class="reference internal" href="#build-a-simple-program-using-boost" id="id29">4 Build a Simple Program Using Boost</a><ul class="auto-toc">
<li><a class="reference internal" href="#build-from-the-visual-studio-ide" id="id30">4.1 Build From the Visual Studio IDE</a></li>
<li><a class="reference internal" href="#or-build-from-the-command-prompt" id="id31">4.2 Or, Build From the Command Prompt</a></li>
<li><a class="reference internal" href="#errors-and-warnings" id="id32">4.3 Errors and Warnings</a></li>
</ul>
</li>
<li><a class="reference internal" href="#prepare-to-use-a-boost-library-binary" id="id33">5 Prepare to Use a Boost Library Binary</a><ul class="auto-toc">
<li><a class="reference internal" href="#install-visual-studio-binaries" id="id34">5.1 Install Visual Studio Binaries</a></li>
<li><a class="reference internal" href="#or-build-binaries-from-source" id="id35">5.2 Or, Build Binaries From Source</a><ul class="auto-toc">
<li><a class="reference internal" href="#get-bjam" id="id36">5.2.1 Get <tt class="docutils literal"><span class="pre">bjam</span></tt></a></li>
<li><a class="reference internal" href="#identify-your-toolset" id="id37">5.2.2 Identify Your Toolset</a></li>
<li><a class="reference internal" href="#select-a-build-directory" id="id38">5.2.3 Select a Build Directory</a></li>
<li><a class="reference internal" href="#invoke-bjam" id="id39">5.2.4 Invoke <tt class="docutils literal"><span class="pre">bjam</span></tt></a></li>
</ul>
</li>
<li><a class="reference internal" href="#expected-build-output" id="id40">5.3 Expected Build Output</a></li>
<li><a class="reference internal" href="#in-case-of-build-errors" id="id41">5.4 In Case of Build Errors</a></li>
</ul>
</li>
<li><a class="reference internal" href="#link-your-program-to-a-boost-library" id="id42">6 Link Your Program to a Boost Library</a><ul class="auto-toc">
<li><a class="reference internal" href="#link-from-within-the-visual-studio-ide" id="id43">6.1 Link From Within the Visual Studio IDE</a></li>
<li><a class="reference internal" href="#or-link-from-the-command-prompt" id="id44">6.2 Or, Link From the Command Prompt</a></li>
<li><a class="reference internal" href="#library-naming" id="id45">6.3 Library Naming</a></li>
<li><a class="reference internal" href="#test-your-program" id="id46">6.4 Test Your Program</a></li>
</ul>
</li>
<li><a class="reference internal" href="#conclusion-and-further-resources" id="id47">7 Conclusion and Further Resources</a></li>
</ul>
</div>
<div class="section" id="get-boost">
<h1><a class="toc-backref" href="#id26">1 Get Boost</a></h1>
<p>The easiest way to get a copy of Boost is to use an installer.
The <a class="reference external" href="/doc/libs/1_36_0/more/getting_started/index.html">Boost website version of this Getting Started guide</a> will
have undated information on installers as they become available,
or see <a class="external" href="http://sourceforge.net/project/showfiles.php?group_id=7586&package_id=8041">Boost downloads</a> or the <a class="external" href="http://www.boostpro.com/products/free">installer</a> provided by <a class="external" href="http://www.boostpro.com">BoostPro Computing</a>. 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 <a class="reference external" href="../../libs/regex/index.html">Boost.Regex</a> binaries when given the option.</p>
<p>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 <a class="external" href="http://sourceforge.net/project/showfiles.php?group_id=7586&package_id=8041"><tt class="docutils literal"><span class="pre">