3 <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
4 <title>Building and Installing the Library</title>
5 <link rel="stylesheet" href="../../../../../doc/src/boostbook.css" type="text/css">
6 <meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
7 <link rel="home" href="../index.html" title="Boost.Regex 5.1.4">
8 <link rel="up" href="../index.html" title="Boost.Regex 5.1.4">
9 <link rel="prev" href="configuration/tuning.html" title="Algorithm Tuning">
10 <link rel="next" href="intro.html" title="Introduction and Overview">
12 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
13 <table cellpadding="2" width="100%"><tr>
14 <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td>
15 <td align="center"><a href="../../../../../index.html">Home</a></td>
16 <td align="center"><a href="../../../../../libs/libraries.htm">Libraries</a></td>
17 <td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
18 <td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
19 <td align="center"><a href="../../../../../more/index.htm">More</a></td>
22 <div class="spirit-nav">
23 <a accesskey="p" href="configuration/tuning.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="intro.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
26 <div class="titlepage"><div><div><h2 class="title" style="clear: both">
27 <a name="boost_regex.install"></a><a class="link" href="install.html" title="Building and Installing the Library">Building and Installing the Library</a>
28 </h2></div></div></div>
30 When you extract the library from its zip file, you must preserve its internal
31 directory structure (for example by using the -d option when extracting). If
32 you didn't do that when extracting, then you'd better stop reading this, delete
33 the files you just extracted, and try again!
36 This library should not need configuring before use; most popular compilers/standard
37 libraries/platforms are already supported "as is". If you do experience
38 configuration problems, or just want to test the configuration with your compiler,
39 then the process is the same as for all of boost; see the <a href="../../../../config/index.html" target="_top">configuration
40 library documentation</a>.
43 The library will encase all code inside namespace boost.
46 Unlike some other template libraries, this library consists of a mixture of
47 template code (in the headers) and static code and data (in cpp files). Consequently
48 it is necessary to build the library's support code into a library or archive
49 file before you can use it, instructions for specific platforms are as follows:
52 <a name="boost_regex.install.h0"></a>
53 <span class="phrase"><a name="boost_regex.install.building_with_bjam"></a></span><a class="link" href="install.html#boost_regex.install.building_with_bjam">Building
57 This is now the preferred method for building and installing this library,
58 please refer to the <a href="../../../../../more/getting_started.html" target="_top">getting
59 started guide</a> for more information.
62 <a name="boost_regex.install.h1"></a>
63 <span class="phrase"><a name="boost_regex.install.building_with_unicode_and_icu_su"></a></span><a class="link" href="install.html#boost_regex.install.building_with_unicode_and_icu_su">Building
64 With Unicode and ICU Support</a>
67 Boost.Regex is now capable of performing a configuration check to test whether
68 ICU is already installed in your compiler's search paths. When you build you
69 should see a message like this:
71 <pre class="programlisting"><span class="identifier">Performing</span> <span class="identifier">configuration</span> <span class="identifier">checks</span>
73 <span class="special">-</span> <span class="identifier">has_icu</span> <span class="identifier">builds</span> <span class="special">:</span> <span class="identifier">yes</span>
76 Which means that ICU has been found, and support for it will be enabled in
79 <div class="tip"><table border="0" summary="Tip">
81 <td rowspan="2" align="center" valign="top" width="25"><img alt="[Tip]" src="../../../../../doc/src/images/tip.png"></td>
82 <th align="left">Tip</th>
84 <tr><td align="left" valign="top"><p>
85 If you don't want the regex library to use ICU then build with the "--disable-icu"
92 <pre class="programlisting"><span class="identifier">Performing</span> <span class="identifier">configuration</span> <span class="identifier">checks</span>
94 <span class="special">-</span> <span class="identifier">has_icu</span> <span class="identifier">builds</span> <span class="special">:</span> <span class="identifier">no</span>
97 Then ICU was not found and support for it will not be compiled into the library.
98 If you think that it should have been found, then you will need to take a look
99 at the contents of the file <span class="emphasis"><em>boost-root/bin.v2/config.log</em></span>
100 for the actual error messages obtained when the build carried out the configuration
101 check. You will then need to fix these errors by ensuring your compiler gets
102 invoked with the correct options. The main options that you're likely to pass
103 to <code class="computeroutput"><span class="identifier">b2</span></code> are:
105 <div class="informaltable"><table class="table">
131 Adds "/some/path" to the list of paths seached for include
132 files, normally equivalent to <code class="computeroutput"><span class="special">-</span><span class="identifier">I</span><span class="special">/</span><span class="identifier">some</span><span class="special">/</span><span class="identifier">path</span></code> on most compilers.
139 library-path=/some/path
144 Adds "/some/path" to the list of paths searched for external
145 libraries, set this to the location of the ICU binaries if they're
146 in a non-standard location.
153 -sICU_ICUUC_NAME=NAME
158 If <code class="computeroutput"><span class="identifier">libicuuc</span></code> has a
159 non-standard name then this sets the name of the library linked against,
160 defaults to either <code class="computeroutput"><span class="identifier">icuuc</span></code>,
161 <code class="computeroutput"><span class="identifier">icuucd</span></code>, <code class="computeroutput"><span class="identifier">sicuuc</span></code> or <code class="computeroutput"><span class="identifier">sicuucd</span></code>
162 depending on build options.
169 -sICU_ICUDT_NAME=NAME
174 If <code class="computeroutput"><span class="identifier">libicudata</span></code> has
175 a non-standard name then this sets the name of the library linked
176 against, defaults to either <code class="computeroutput"><span class="identifier">icudt</span></code>,
177 <code class="computeroutput"><span class="identifier">icudata</span></code>, <code class="computeroutput"><span class="identifier">sicudt</span></code> or <code class="computeroutput"><span class="identifier">sicudata</span></code>
178 depending on build options and platform.
185 -sICU_ICUIN_NAME=NAME
190 If <code class="computeroutput"><span class="identifier">libicui18n</span></code> has
191 a non-standatd name then this sets the name of the library linked
192 against, defaults to either <code class="computeroutput"><span class="identifier">icui18n</span></code>,
193 <code class="computeroutput"><span class="identifier">icuin</span></code>, <code class="computeroutput"><span class="identifier">icuind</span></code>, sicuin<code class="computeroutput"> <span class="keyword">or</span>
194 </code>sicuins` depending on build options and platform.
206 Sets the C++ standard supported: XX should be either 03, 11, 14,
219 Passes "FLAGS" directly to the compiler, an option of last
232 Passes "FLAGS" directly to the compiler on the link step,
233 an option of last resort!
239 <div class="important"><table border="0" summary="Important">
241 <td rowspan="2" align="center" valign="top" width="25"><img alt="[Important]" src="../../../../../doc/src/images/important.png"></td>
242 <th align="left">Important</th>
244 <tr><td align="left" valign="top"><p>
245 Configuration results are cached - if you try rebuilding with different compiler
246 options then add an "-a" to the bjam command line to force all
247 targets to be rebuilt.
250 <div class="important"><table border="0" summary="Important">
252 <td rowspan="2" align="center" valign="top" width="25"><img alt="[Important]" src="../../../../../doc/src/images/important.png"></td>
253 <th align="left">Important</th>
255 <tr><td align="left" valign="top"><p>
256 ICU is a C++ library just like Boost is, as such your copy of ICU must have
257 been built with the same C++ compiler (and compiler version) that you are
258 using to build Boost. Boost.Regex will not work correctly unless you ensure
259 that this is the case: it is up to you to ensure that the version of ICU
260 you are using is binary compatible with the toolset you use to build Boost.
264 And finally, if you want to build/test with multiple compiler versions, all
265 with different ICU builds, then the only way to achieve that currently is to
266 modify your user-config.jam so that each toolset has the necessary compiler/linker
267 options set so that ICU is found automatically by the configuration step (providing
268 the ICU binaries use the standard names, all you have to add is the appropriate
269 header-include and linker-search paths).
272 <a name="boost_regex.install.h2"></a>
273 <span class="phrase"><a name="boost_regex.install.building_from_source"></a></span><a class="link" href="install.html#boost_regex.install.building_from_source">Building
277 The Regex library is "just a bunch of source files": nothing special
278 is required to build them.
281 You can either build the files under boost-path/libs/regex/src/*.cpp as a library,
282 or add them directly to your project. This is particularly useful if you need
283 to use specific compiler options not supported by the default Boost build.
286 There are two #defines you should be aware of:
288 <div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
289 <li class="listitem">
290 BOOST_HAS_ICU should be defined if you want ICU support compiled in.
292 <li class="listitem">
293 BOOST_REGEX_DYN_LINK should be defined if you are building a DLL on Windows.
297 <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
298 <td align="left"></td>
299 <td align="right"><div class="copyright-footer">Copyright © 1998-2013 John Maddock<p>
300 Distributed under the Boost Software License, Version 1.0. (See accompanying
301 file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
306 <div class="spirit-nav">
307 <a accesskey="p" href="configuration/tuning.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="intro.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>