getting_started.html 52 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  2. <html>
  3. <head>
  4. <title>Getting Started</title>
  5. <meta content="HTML Tidy for Cygwin (vers 1st April 2002), see www.w3.org" name="generator">
  6. <meta content="Microsoft FrontPage 5.0" name="generator">
  7. <meta http-equiv="Content-Language" content="en-us">
  8. <meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
  9. <LINK href="../boost.css" type="text/css" rel="stylesheet"></head>
  10. <body text="#000000" bgColor="#ffffff">
  11. <table cellSpacing="0" cellPadding="0" width="100%" summary="" border="0">
  12. <tr vAlign="top">
  13. <td vAlign="top" align="left"><IMG height="86" alt="boost.png (6897 bytes)" src="../boost.png" width="277"></td>
  14. <td vAlign="top" align="right">
  15. <table cellSpacing="0" cellPadding="2" summary="" border="1">
  16. <tr>
  17. <td>
  18. <table cellSpacing="0" cellPadding="2" summary="" border="0">
  19. <tr>
  20. <td bgColor="#dddddd">
  21. <p>.&nbsp;<A href="../index.htm">Home</A><br>
  22. .&nbsp;<A href="../libs/libraries.htm">Libraries</A><br>
  23. .&nbsp;<A href="../people/people.htm">People</A><br>
  24. .&nbsp;<A href="faq.htm">FAQ</A><br>
  25. .&nbsp;<A href="index.htm">More</A></p>
  26. </td>
  27. </tr>
  28. </table>
  29. </td>
  30. </tr>
  31. </table>
  32. </td>
  33. </tr>
  34. </table>
  35. <h1>Getting Started</h1>
  36. <ul>
  37. <li>
  38. <A href="#Introduction">Introduction</A>
  39. <li>
  40. <A href="#Download">Download</A>
  41. <ul>
  42. <li>
  43. <A href="#.zip">.zip file</A>
  44. <li>
  45. <A href="#.tar.gz">.tar.gz and .tar.bz2 files</A>
  46. <li>
  47. <A href="#CVS">Boost CVS Repository</A>
  48. </li>
  49. </ul>
  50. <li>
  51. <A href="#Preparation">Preparation</A>
  52. <ul>
  53. <li>
  54. <A href="#Configuring">Configuring the tools</A>
  55. <li>
  56. <A href="#Tools">Supported Toolsets</A>
  57. </li>
  58. </ul>
  59. <li>
  60. <A href="#Build_Install">Build and Install</A>
  61. <li>
  62. <A href="#Results">Results</A>
  63. <LI>
  64. <A href="#auto-link">Automatic Linking on Windows</A>
  65. <li>
  66. <A href="#Additional_Steps">Additional Steps</A>
  67. </li>
  68. </ul>
  69. <h2><a id="Introduction" name="Introduction">Introduction</a></h2>
  70. <p>These instructions are intended to help you get started using the Boost
  71. Libraries. This walks you through getting, building, and installing the
  72. libraries. To summarize these are the steps to get Boost built and installed:</p>
  73. <ol>
  74. <li>
  75. <A href="#step1">Download Boost</A>.
  76. <li>
  77. <A href="#step2">Install Boost.Jam</A>.
  78. <li>
  79. <A href="#step3">Configure your compiler toolset</A>.
  80. <li>
  81. <A href="#step4">Go to Boost distribution directory</A>.
  82. <li>
  83. <A href="#step5">Build and install</A>.
  84. </li>
  85. </ol>
  86. <h2><a id="Download" name="Download"></a>Download</h2>
  87. <table cellSpacing="2" cellPadding="2" width="100%" summary="" border="0">
  88. <tr vAlign="top" align="left">
  89. <td vAlign="top" align="center" width="40" bgColor="#ffff66"><font size="6"><b><a id="step1" name="step1"></a>1</b></font></td>
  90. <td>The Boost Libraries are distributed through the SourceForge file distribution
  91. system. Click here to <b><a href="http://sourceforge.net/project/showfiles.php?group_id=7586&package_id=8041">
  92. <font size="4">download releases from SourceForge</font></a></b>. And
  93. unpack the release to a convenient location.</td>
  94. </tr>
  95. </table>
  96. <p>The Boost release includes all of the libraries and other material from the web
  97. site. It is available in <A href="#.zip">ZIP</A>, <A href="#.tar.gz">TAR.GZ</A>,
  98. and <A href="#.tar.gz">TAR.BZ2</A> formats. Past releases are also available.</p>
  99. It is also possible to download current snapshots of work-in-progress from
  100. Boost's <A href="#CVS">CVS repository</A>.
  101. <h3><a id="zip" name=".zip">.zip</a> file</h3>
  102. The .zip format is widely supported by both free decoders and commercial
  103. compress/archive utilities. If you don't already have a .zip file decoder,
  104. download one from the <a href="http://www.info-zip.org/">Info-ZIP</a> web site,
  105. which supplies versions for many operating systems.
  106. <p>Text file line endings in the .zip file are as supplied by each library
  107. developer.&nbsp; This works fine for Windows, but not for Unix/Linux.&nbsp; The
  108. .tar.gz and .tar.bz2 files supply Unix/Linux friendly line endings.</p>
  109. <h3><a id="tar_gz" name=".tar.gz">.tar.gz</a> and .tar.bz2 files</h3>
  110. <p>The .tar.gz format is widely supported on Unix/Linux platforms. Some Windows
  111. compress/archive utilities can read the format as well.&nbsp; Because the gzip
  112. format compresses the archive as a single file rather than compressing each
  113. file individually, the .tar.gz file is smaller that the .zip file.</p>
  114. <p>The .tar.bz2 format is becoming widely available on Unix/Linux platforms and is
  115. built into many tar utilities. This format differs for the .tar.gz format in
  116. the compression used, which is considerably better and therefore creates
  117. smaller files.</p>
  118. <p>Text file line endings in the .tar.gz and .tar.bz2 files have been converted to
  119. newlines for ease of use on Unix/Linux platforms.</p>
  120. <h3>Boost <a id="CVS" name="CVS">CVS</a> Repository</h3>
  121. <p>All Boost files, including the entire distribution tree including web site HTML
  122. is maintained in a CVS repository. Command line, GUI, or browser access is
  123. available.</p>
  124. <h4>Boost CVS access via command line or graphical clients</h4>
  125. For those who have CVS clients installed, the libraries are also available from
  126. the public <a href="http://sourceforge.net/cvs/?group_id=7586">Boost CVS
  127. repository</a>. Free command line clients (often already installed on
  128. Linux/Unix systems) are available for many systems, and free GUI clients are
  129. available for Windows, Mac, and other systems.
  130. <p>See the much improved <a href="http://sourceforge.net/docman/?group_id=1">CVS
  131. documentation</a> (Section F) from SourceForge, which includes links to the
  132. home pages for various GUI and command line clients.</p>
  133. <p>The general procedure for command-line clients is something like this:</p>
  134. <blockquote><code>cvs -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/boost login</code><br>
  135. [Hit &lt;return&gt; when it asks for a password]<br>
  136. <code>cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/boost checkout
  137. boost</code><br>
  138. <code>cvs -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/boost logout</code> </blockquote>
  139. Read the manual for your CVS client for further information.
  140. <p>This access is read-only; if you are a library author and wish to have CVS
  141. write access, please contact one of the <A href="moderators.html">moderators</A>.</p>
  142. <h4>Boost CVS access via web <a id="Browser" name="Browser">Browser</a></h4>
  143. For access to the CVS archive from any modern web browser, you can also use the <a href="http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/boost/boost/">
  144. web browser&nbsp; interface</a>.&nbsp; Try one of the color diffs to see how
  145. a file has changed over time. <b>Note:</b> this interface is only suitable for
  146. viewing individual files and their revision histories.
  147. <h4><a id="generated" name="generated">Documentation</a> generated from BoostBook
  148. in CVS</h4>
  149. <p>Some of the Boost documentation is generated from <A href="../doc/html/boostbook.html">
  150. BoostBook XML</A> source stored in the CVS repository, and will not appear
  151. directly in the CVS tree as readable HTML. View a nightly build of the
  152. generated HTML on the <a href="http://www.boost.org/regression-logs/cs-win32_metacomm/doc/html/libraries.html">
  153. Nightly Generated Documentation</a> page. Where generated HTML is missing
  154. from the CVS tree, an attempt has been made to include redirection to this
  155. nightly build, but if you are away from an internet connection you may want to
  156. download the generated documentation archive from the aforementioned page so
  157. you can browse those documents offline.</p>
  158. <h2><a id="Preparation" name="Preparation"></a>Preparation</h2>
  159. <p>The recommended way to build and install the Boost Libraries is to use <A href="../tools/build/v1/build_system.htm">
  160. Boost.Build</A>, the Boost Build system. The rest of these instructions
  161. explain that use, but it is up to you to use this method, or not. Note that
  162. some of the libraries also include non Boost.Build makefiles and/or project
  163. files. But all include the needed files for building with Boost.Build.</p>
  164. <table cellSpacing="2" cellPadding="2" width="100%" summary="" border="0">
  165. <tr vAlign="top" align="left">
  166. <td vAlign="top" align="center" width="40" bgColor="#ffff66"><font size="6"><b><a id="step2" name="step2"></a>2</b></font></td>
  167. <td>The build system uses <A href="../tools/build/jam_src/index.html">Boost.Jam</A>,
  168. an extension of the <a href="http://www.perforce.com/jam/jam.html">Perforce Jam</a>
  169. portable <i>make</i> replacement. The recommended way to get Boost.Jam if you
  170. are using a Boost distribution is to <strong><a href="http://sourceforge.net/project/showfiles.php?group_id=7586&amp;package_id=72941">
  171. download a prebuilt executable</a></strong> from SourceForge. If a
  172. prebuilt executable is not provided for your platform or you are using Boost's
  173. sources in an unreleased state, it may be necessary to <A href="../tools/build/jam_src/index.html#building_bjam">
  174. build <tt>bjam</tt> from sources</A> included in the Boost source tree. To
  175. install Boost.Jam, copy the <tt>bjam</tt> executable to a location accessible
  176. in your <tt>PATH</tt>.</td>
  177. </tr>
  178. </table>
  179. <h3><a id="Configuring" name="Configuring">Configuring the tools</a></h3>
  180. <p>Before using Boost.Build you will need to configure the compiler tools you are
  181. using. The build system's toolsets are designed to work in either of two ways:</p>
  182. <ol>
  183. <li>
  184. The user sets up all of the environment for each toolset he wants to use in the
  185. normal way. For example, for Microsoft VC++, ...VC98/Bin or .../VC7/Bin is in
  186. the PATH environment variable, VCVARS32.BAT or VSVARS32.BAT has been invoked,
  187. etc. For Metrowerks CodeWarrior, cwenv.bat or equivalent has been called and
  188. ...Other Metrowerks Tools/Command Line Tools is in the path. Many Unix
  189. operating systems come preconfigured this way and require no user intervention.<br>
  190. <br>
  191. <li>
  192. The user doesn't want his environment cluttered with settings or has
  193. nonstandard installations for some of his tools. Instead, he or she sets
  194. variables which point to the toolset installation directories, either in the
  195. command shell environment or on the <code>bjam</code> command-line. These
  196. variables are used by the build system to locate the tools and invoke the
  197. necessary setup. To set the variables on the <tt>bjam</tt> command-line you use
  198. the "<tt>-s</tt>" option. For example:<br>
  199. <br>
  200. <tt>bjam "-sGCC_ROOT_DIRECTORY=/usr/local/gcc-3.3.2"</tt><br>
  201. <br>
  202. Some variables, like the toolset <tt>TOOLS</tt> variable, can accept multiple
  203. values separated by spaces. Others, like the path above, can contain spaces.
  204. For such circumstances you should use quotes appropriate for your command
  205. interpreter.<br>
  206. </li>
  207. </ol>
  208. <h3><a id="Tools" name="Tools">Supported Toolsets</a></h3>
  209. <table cellSpacing="2" cellPadding="2" width="100%" summary="" border="0">
  210. <tr vAlign="top" align="left">
  211. <td vAlign="top" align="center" width="40" bgColor="#ffff66"><font size="6"><b><a id="step3" name="step3"></a>3</b></font></td>
  212. <td>The following toolsets are supported by Boost.Build. For information about <A href="#Configuring">
  213. configuring</A> each toolset, click its name in the leftmost column.</td>
  214. </tr>
  215. </table>
  216. <br>
  217. <table cellPadding="5" summary="" border="1">
  218. <tr>
  219. <td><b>TOOLS Name</b></td>
  220. <td><b>Description</b></td>
  221. </tr>
  222. <tr>
  223. <td><A href="../tools/build/v1/borland-tools.html"><code>borland</code></A></td>
  224. <td><a href="http://www.borland.com/bcppbuilder/freecompiler">Borland</a> C++</td>
  225. </tr>
  226. <tr>
  227. <td><A href="../tools/build/v1/como-tools.html"><code>como</code></A></td>
  228. <td><a href="http://www.comeaucomputing.com">Comeau C++</a> compiler front-end for
  229. non-Windows platforms</td>
  230. </tr>
  231. <tr>
  232. <td><code><A href="../tools/build/v1/como-tools.html">como-win32</A></code></td>
  233. <td><a href="http://www.comeaucomputing.com">Comeau C++</a> compiler front-end for
  234. Windows, using Microsoft <a href="http://msdn.microsoft.com/visualc/">Visual C++</a>as
  235. a back-end.</td>
  236. </tr>
  237. <tr>
  238. <td><A href="../tools/build/v1/cw-tools.html"><code>cw</code></A></td>
  239. <td><a href="http://www.metrowerks.com">Metrowerks CodeWarrior</a> Pro 6.x, 7.x,
  240. 8.x, and 9.x command-line tools</td>
  241. </tr>
  242. <tr>
  243. <td><A href="../tools/build/v1/darwin-tools.html"><code>darwin</code></A></td>
  244. <td>Apple Darwin OS hosted GNU <a href="http://developer.apple.com/tools/compilers.html">
  245. GCC</a></td>
  246. </tr>
  247. <tr>
  248. <td><A href="../tools/build/v1/dmc-tools.html"><code>dmc</code></A></td>
  249. <td><a href="http://www.digitalmars.com/">Digital Mars C++</a>.</td>
  250. </tr>
  251. <tr>
  252. <td><A href="../tools/build/v1/dmc-stlport-tools.html"><code>dmc-stlport</code></A></td>
  253. <td><a href="http://www.digitalmars.com/">Digital Mars C++</a>, using the <a href="http://www.stlport.org">
  254. STLport</a> standard library implementation</td>
  255. </tr>
  256. <tr>
  257. <td><A href="../tools/build/v1/edg-tools.html"><code>edg</code></A></td>
  258. <td><a href="http://www.edg.com/">Edison Design Group</a> compiler front-end
  259. (evaluation version)</td>
  260. </tr>
  261. <tr>
  262. <td><A href="../tools/build/v1/gcc-tools.html"><code>gcc</code></A></td>
  263. <td><a href="http://gcc.gnu.org">GNU GCC</a> on Unix and <a href="http://www.cygwin.com">
  264. Cygwin</a>.</td>
  265. </tr>
  266. <tr>
  267. <td><A href="../tools/build/v1/gcc-stlport-tools.html"><code>gcc-stlport</code></A></td>
  268. <td><a href="http://gcc.gnu.org">GNU GCC</a> on Unix and <a href="http://www.cygwin.com">
  269. Cygwin</a>, using the <a href="http://www.stlport.org">STLport</a> standard
  270. library implementation</td>
  271. </tr>
  272. <tr>
  273. <td><A href="../tools/build/v1/gcc-nocygwin-tools.html"><code>gcc-nocygwin</code></A></td>
  274. <td>GNU GCC Cygwin command line compiler tools running in "no-cygwin" mode
  275. (produces commercially redistributable objects)</td>
  276. </tr>
  277. <tr>
  278. <td><A href="../tools/build/v1/intel-linux-tools.html"><code>intel-linux</code></A></td>
  279. <td><a href="http://www.intel.com/software/products/compilers/c60l/">Intel C++ for
  280. Linux</a></td>
  281. </tr>
  282. <tr>
  283. <td><A href="../tools/build/v1/intel-win32-tools.html"><code>intel-win32</code></A></td>
  284. <td><a href="http://www.intel.com/software/products/compilers/c60/">Intel C++ for
  285. Windows</a> using the Dinkumware standard library in the Intel-required
  286. Microsoft <a href="http://msdn.microsoft.com/visualc/">Visual C++</a> 6 or 7
  287. installation</td>
  288. </tr>
  289. <tr>
  290. <td><A href="../tools/build/v1/kcc-tools.html"><code>kcc</code></A></td>
  291. <td>KAI C++</td>
  292. </tr>
  293. <tr>
  294. <td><A href="../tools/build/v1/kylix-tools.html"><code>kylix</code></A></td>
  295. <td><a href="http://www.borland.com/kylix">Borland C++ for Linux (Kylix).</a></td>
  296. </tr>
  297. <tr>
  298. <td><A href="../tools/build/v1/mingw-tools.html"><code>mingw</code></A></td>
  299. <td>GNU GCC and associated tools in <a href="http://www.mingw.org">MinGW</a> configuration
  300. (produces commercially redistributable objects)</td>
  301. </tr>
  302. <tr>
  303. <td><A href="../tools/build/v1/mingw-stlport-tools.html"><code>mingw-stlport</code></A></td>
  304. <td>GNU GCC and associated tools in <a href="http://www.mingw.org">MinGW</a> configuration
  305. (produces commercially redistributable objects), using the <a href="http://www.stlport.org">
  306. STLport</a> standard library implementation</td>
  307. </tr>
  308. <tr>
  309. <td><A href="../tools/build/v1/mipspro-tools.html"><code>mipspro</code></A></td>
  310. <td>SGI <a href="http://www.sgi.com/developers/devtools/languages/mipspro.html">MIPSpro
  311. C and C++</a></td>
  312. </tr>
  313. <tr>
  314. <td><A href="../tools/build/v1/msvc-tools.html"><code>msvc</code></A></td>
  315. <td>Microsoft <a href="http://msdn.microsoft.com/visualc/">Visual C++</a> version
  316. 6 command-line tools. NOTE; For version 7.x (the .NET series) use the vc7 or
  317. vc-7_1 toolsets below.</td>
  318. </tr>
  319. <tr>
  320. <td><A href="../tools/build/v1/msvc-stlport-tools.html"><code>msvc-stlport</code></A></td>
  321. <td>Microsoft <a href="http://msdn.microsoft.com/visualc/">Visual C++</a> version
  322. 6 command-line tools, using the <a href="http://www.stlport.org">STLport</a> standard
  323. library implementation. NOTE; For version 7.x (the .NET series) use the
  324. vc7-stlport or vc-7_1-stlport toolsets below.</td>
  325. </tr>
  326. <tr>
  327. <td><A href="../tools/build/v1/sunpro-tools.html"><code>sunpro</code></A></td>
  328. <td><a href="http://wwws.sun.com/software/sundev/suncc/index.html">SunPRO C++</a> compiler</td>
  329. </tr>
  330. <tr>
  331. <td><A href="../tools/build/v1/tru64cxx-tools.html"><code>tru64cxx</code></A></td>
  332. <td><a href="http://www.tru64unix.compaq.com/cplus/">Compaq C++</a> for Tru64 UNIX
  333. (versions prior to 6.5)</td>
  334. </tr>
  335. <tr>
  336. <td><A href="../tools/build/v1/tru64cxx-tools.html"><code>tru64cxx65</code></A></td>
  337. <td><a href="http://www.tru64unix.compaq.com/cplus/">Compaq C++</a> Version 6.5
  338. for Tru64 UNIX</td>
  339. </tr>
  340. <tr>
  341. <td><A href="../tools/build/v1/vacpp-tools.html"><code>vacpp</code></A></td>
  342. <td><a href="http://www-3.ibm.com/software/ad/vacpp/">IBM Visual Age C++</a> command-line
  343. tools</td>
  344. </tr>
  345. <tr>
  346. <td><A href="../tools/build/v1/vc7-tools.html"><code>vc7</code></A></td>
  347. <td>Microsoft <a href="http://msdn.microsoft.com/visualc/">Visual C++</a> command-line
  348. tools from Visual Studio .NET.</td>
  349. </tr>
  350. <tr>
  351. <td><A href="../tools/build/v1/vc7-stlport-tools.html"><code>vc7-stlport</code></A></td>
  352. <td>Microsoft <a href="http://msdn.microsoft.com/visualc/">Visual C++</a> command-line
  353. tools from Visual Studio .NET + STLPort.</td>
  354. </tr>
  355. <tr>
  356. <td><A href="../tools/build/v1/vc-7_1-tools.html"><code>vc-7_1</code></A></td>
  357. <td>Microsoft <a href="http://msdn.microsoft.com/visualc/">Visual C++</a> command-line
  358. tools from Visual Studio .NET 2003.</td>
  359. </tr>
  360. <tr>
  361. <td><A href="../tools/build/v1/vc-7_1-stlport-tools.html"><code>vc-7_1-stlport</code></A></td>
  362. <td>Microsoft <a href="http://msdn.microsoft.com/visualc/">Visual C++</a> command-line
  363. tools from Visual Studio .NET 2003 + STLPort.</td>
  364. </tr>
  365. </table>
  366. <h2><a id="Build_Install" name="Build_Install"></a>Build and Install</h2>
  367. <p>The common build and install process is driven by the top-level build file (<A href="../Jamfile">Jamfile</A>).</p>
  368. <table cellSpacing="2" cellPadding="2" width="100%" summary="" border="0">
  369. <tr vAlign="top" align="left">
  370. <td vAlign="top" align="center" width="40" bgColor="#ffff66"><font size="6"><b><a id="step4" name="step4"></a>4</b></font></td>
  371. <td>
  372. <p>First you need to change to the directory where you have the Boost distribution
  373. you downloaded. For example:</p>
  374. <blockquote>
  375. <p><code>chdir&nbsp;boost-1.31.0</code></p>
  376. </blockquote>
  377. </td>
  378. </tr>
  379. </table>
  380. <p>The default build and install attempts to build all available libraries and
  381. install to default locations the libraries and Boost header files. On Unix
  382. systems the default install location is "<tt>/usr/local</tt>", and on Windows
  383. systems the default is "<tt>C:\Boost</tt>". Within those directories libraries
  384. are installed to the "<tt>lib</tt>" subdirectory, and headers to an "<tt>include/boost-1_31</tt>"
  385. subdirectory, the version will reflect the distribution you are installing.</p>
  386. <table cellSpacing="2" cellPadding="2" width="100%" summary="" border="0">
  387. <tr vAlign="top" align="left">
  388. <td vAlign="top" align="center" width="40" bgColor="#ffff66"><font size="6"><b><a id="step5" name="step5"></a>5</b></font></td>
  389. <td>Invoke the build system, specifying the <A href="#Tools">toolset</A>(s) you
  390. wish to use, to build and install. For example for GNU/GCC. <blockquote>
  391. <p><code>bjam&nbsp;"-sTOOLS=gcc" install</code></p>
  392. </blockquote>
  393. <p>Or if you are interested only in the built libraries you can have them built
  394. and collected to a common directory without installation.</p>
  395. <blockquote>
  396. <p><code>bjam&nbsp;"-sTOOLS=gcc" stage</code></p>
  397. </blockquote>
  398. </td>
  399. </tr>
  400. </table>
  401. <p>The build and install system can be controlled through a set of options similar
  402. in style to GNU configure options. The options allow you to, among other
  403. things, change the install location, disable building of libraries, etc. You
  404. can see a summary of the available options by invoking "<tt>bjam --help</tt>".
  405. The full invocation takes the form:</p>
  406. <blockquote>
  407. <p><code>bjam&nbsp;[<i>options</i>...] [install|stage]</code></p>
  408. </blockquote>
  409. <table cellSpacing="0" cellPadding="2" summary="" border="1">
  410. <tr>
  411. <th>
  412. Action</th>
  413. <td>&nbsp;</td>
  414. </tr>
  415. <tr>
  416. <td vAlign="top" noWrap align="left"><i>none</i></td>
  417. <td vAlign="top" align="left">Only builds the Boost libraries. This lets you do
  418. the first part of what the <tt>install</tt> action normally does without
  419. copying the built libraries to the install location.</td>
  420. </tr>
  421. <tr>
  422. <td vAlign="top" noWrap align="left"><tt>install</tt></td>
  423. <td vAlign="top" align="left">Builds and installs Boost libraries and headers.</td>
  424. </tr>
  425. <tr>
  426. <td vAlign="top" noWrap align="left"><tt>stage</tt></td>
  427. <td vAlign="top" align="left">Builds the Boost libraries and copies them into a
  428. common directory.</td>
  429. </tr>
  430. <tr>
  431. <th noWrap>
  432. Option</th>
  433. <td vAlign="top" align="left">&nbsp;</td>
  434. </tr>
  435. <tr>
  436. <td vAlign="top" noWrap align="left"><tt>--help</tt></td>
  437. <td vAlign="top" align="left">Shows a short summary of the options and syntax of
  438. the command.</td>
  439. </tr>
  440. <tr>
  441. <td vAlign="top" noWrap align="left"><tt>-sTOOLS=&lt;<i>toolsets</i>&gt;</tt></td>
  442. <td vAlign="top" align="left">The list of tools to compile with. Usually only one
  443. is needed.</td>
  444. </tr>
  445. <tr>
  446. <td vAlign="top" noWrap align="left"><tt>--prefix=PREFIX</tt></td>
  447. <td vAlign="top" align="left">Install architecture independent files here.<br>
  448. Default; <tt>C:\Boost</tt> on Win32.<br>
  449. Default; <tt>/usr/local</tt> on Unix. Linux, etc.</td>
  450. </tr>
  451. <tr>
  452. <td vAlign="top" noWrap align="left"><tt>--exec-prefix=EPREFIX</tt></td>
  453. <td vAlign="top" align="left">Install architecture dependent files here.<br>
  454. Default; <tt>PREFIX</tt></td>
  455. </tr>
  456. <tr>
  457. <td vAlign="top" noWrap align="left"><tt>--libdir=DIR</tt></td>
  458. <td vAlign="top" align="left">Install libraries here.<br>
  459. Default; <tt>EPREFIX/lib</tt></td>
  460. </tr>
  461. <tr>
  462. <td vAlign="top" noWrap align="left"><tt>--includedir=DIR</tt></td>
  463. <td vAlign="top" align="left">Install source headers here. The Boost headers are
  464. installed in a version specific "<tt>boost-&lt;version&gt;</tt>" subdirectory
  465. in this directory.<br>
  466. Default; <tt>PREFIX/include</tt></td>
  467. </tr>
  468. <tr>
  469. <td vAlign="top" noWrap align="left"><tt>--builddir=DIR</tt></td>
  470. <td vAlign="top" align="left">Build in this location instead of building within
  471. the distribution tree. This moves where the sources for the libraries are
  472. compiled to before they are installed. Recommended!</td>
  473. </tr>
  474. <tr>
  475. <td vAlign="top" noWrap align="left"><tt>--stagedir=DIR</tt></td>
  476. <td vAlign="top" align="left">When staging only, with the "<tt>stage</tt>" action,
  477. copy to the given location.<br>
  478. Default; <tt>./stage</tt></td>
  479. </tr>
  480. <tr>
  481. <td vAlign="top" noWrap align="left"><tt>--without-&lt;<i>library</i>&gt;</tt></td>
  482. <td vAlign="top" align="left">Do not build, stage, or install the specified
  483. library.</td>
  484. </tr>
  485. <tr>
  486. <td vAlign="top" noWrap align="left"><tt>--with-&lt;<i>library</i>&gt;</tt></td>
  487. <td vAlign="top" align="left">Build, stage, or install the specified library. This
  488. changes the default from trying to build all possible libraries, to only
  489. building the specified libraries.</td>
  490. </tr>
  491. <tr>
  492. <td vAlign="top" noWrap align="left"><tt>--with-python-root[=PYTHON_ROOT]</tt></td>
  493. <td vAlign="top" align="left">Build Boost.Python libraries with the Python devel
  494. packages located at <tt>PYTHON_ROOT</tt>. The Boost.Python libraries are built
  495. only if the build can find the Python development package at this location.<br>
  496. Default; <tt>C:\tools\python</tt> on Win32.<br>
  497. Default; <tt>/usr/local</tt> on Unix, Linux, etc.<br>
  498. Default; <tt>/usr</tt> on Cygwin.</td>
  499. </tr>
  500. <tr>
  501. <td vAlign="top" noWrap align="left"><tt>--with-pydebug</tt></td>
  502. <td vAlign="top" align="left">Build Boost.Python libraries using the Python debug
  503. runtime. This builds an additional set of libraries for use with the debug
  504. version of Python. The regular versions of the Boost.Python libraries are also
  505. built.</td>
  506. </tr>
  507. <tr>
  508. <td vAlign="top" noWrap align="left"><tt>-sHAVE_ICU=1</tt></td>
  509. <td vAlign="top" align="left">Build Boost.Regex libraries with Unicode support
  510. provided by the <a href="http://www-306.ibm.com/software/globalization/icu/index.jsp">
  511. ICU libraries</a>. ICU must have been built with the same
  512. compiler that you are using to build Boost, and must be installed into
  513. your compiler's include and library search paths. See
  514. <a href="../libs/regex/doc/install.html#unicode">the Boost.Regex
  515. installation documentation for more information</a>.</td>
  516. </tr>
  517. <tr>
  518. <td vAlign="top" noWrap align="left"><tt>-sICU_PATH=<I>path</I></tt></td>
  519. <td vAlign="top" align="left">Build Boost.Regex libraries with Unicode support
  520. provided by the <a href="http://www-306.ibm.com/software/globalization/icu/index.jsp">
  521. ICU libraries</a>. ICU must have been built with the same
  522. compiler that you are using to build Boost, and must have been built
  523. (or installed to) directory <I>path</I>.
  524. For example if you configured ICU with <tt>--prefix=/usr/local/icu/3.3</tt>, then use
  525. <tt>-sICU_PATH=/usr/local/icu/3.3</tt>. See
  526. <a href="../libs/regex/doc/install.html#unicode">the Boost.Regex
  527. installation documentation for more information</a>.</td>
  528. </tr>
  529. <tr>
  530. <td vAlign="top" noWrap align="left"><tt>-sNO_COMPRESSION=1</tt></td>
  531. <td vAlign="top" align="left">Build Boost.Iostreams without support for the compression
  532. filters which rely on the non-Boost libraries zlib and libbz2. If you use Windows,
  533. this option is enabled by default. If you use UNIX, the compression filters will likely
  534. work with no configuration, so this option should not be necessary. For full details see
  535. <A HREF="http://www.boost.org/libs/iostreams/doc/index.html?path=7">Boost.Iostreams Installation</A>.
  536. </td>
  537. </tr>
  538. </table>
  539. <p>There are additional options as supported by <A href="../tools/build/v1/build_system.htm">
  540. Boost.Build</A> and <A href="../tools/build/jam_src/index.html">Boost.Jam</A>.
  541. Of the additional options perhaps the most imporant is "<tt>-s<A href="../tools/build/v1/build_system.htm#build">BUILD</A>=&lt;features/variants&gt;</tt>"
  542. which lets you override what is built by default. The "<tt>&lt;features/variants&gt;</tt>"
  543. value is a list, separated by spaces, of build requests. Features take the form
  544. of a tag and a value or values. And variants are single symbolic names for a
  545. collection of features. For example the default is to request "<tt>debug release
  546. &lt;runtime-link&gt;static/dynamic &lt;threading&gt;single/multi</tt>", in
  547. which "<tt>debug</tt>" and "<tt>release</tt>" are variants, and the rest
  548. features with two values each.</p>
  549. <p>If you have some feedback about the build and install process please drop us a
  550. line at the <A href="mailing_lists.htm#jamboost">Boost.Build mailing list</A>.
  551. We are particularly interested if it works for your platform and if it there is
  552. anything that you feel could be done better.</p>
  553. <h2><a id="Results" name="Results"></a>Results</h2>
  554. <p>The results of building come in to forms: static libraries, and dynamic
  555. libraries. Depending on the platform the libraries produced have different
  556. names to accommodate the platform requirements. For a single Boost library the
  557. build with the default will produce eight different libraries. For example
  558. building the Boost.Datetime library on Unix type system it would produce:</p>
  559. <ol>
  560. <li>
  561. <tt>libboost_date_time-gcc-d-1_31.so</tt>
  562. <li>
  563. <tt>libboost_date_time-gcc-mt-d-1_31.so</tt>
  564. <li>
  565. <tt>libboost_date_time-gcc-1_31.so</tt>
  566. <li>
  567. <tt>libboost_date_time-gcc-mt-1_31.so</tt>
  568. <li>
  569. <tt>libboost_date_time-gcc-d-1_31.a</tt>
  570. <li>
  571. <tt>libboost_date_time-gcc-mt-d-1_31.a</tt>
  572. <li>
  573. <tt>libboost_date_time-gcc-1_31.a</tt>
  574. <li>
  575. <tt>libboost_date_time-gcc-mt-1_31.a</tt><br>
  576. </li>
  577. </ol>
  578. <table cellSpacing="0" cellPadding="0" width="100%" summary="" border="0">
  579. <tr>
  580. <td colSpan="11">
  581. <table cellSpacing="2" cellPadding="2" bgColor="#cccccc" summary="" border="0">
  582. <tr>
  583. <th>
  584. &middot; Library Prefix</th></tr>
  585. </table>
  586. </td>
  587. <td width="80%">&nbsp;</td>
  588. </tr>
  589. <tr>
  590. <td vAlign="bottom" bgColor="#cccccc" rowSpan="7"><tt><font size="+1">lib</font></tt></td>
  591. <td colSpan="11">
  592. <table cellSpacing="2" cellPadding="2" summary="" border="0">
  593. <tr>
  594. <th>
  595. &middot; Library Name</th></tr>
  596. </table>
  597. </td>
  598. </tr>
  599. <tr>
  600. <td vAlign="bottom" rowSpan="6"><tt><font size="+1">boost_date_time</font></tt></td>
  601. <td colSpan="10">
  602. <table cellSpacing="2" cellPadding="2" bgColor="#cccccc" summary="" border="0">
  603. <tr>
  604. <th>
  605. &middot; Toolset</th></tr>
  606. </table>
  607. </td>
  608. </tr>
  609. <tr>
  610. <td vAlign="bottom" bgColor="#cccccc" rowSpan="5"><tt><font size="+1">-</font></tt></td>
  611. <td vAlign="bottom" bgColor="#cccccc" rowSpan="5"><tt><font size="+1">gcc</font></tt></td>
  612. <td colSpan="8">
  613. <table cellSpacing="2" cellPadding="2" summary="" border="0">
  614. <tr>
  615. <th>
  616. &middot; Threading</th></tr>
  617. </table>
  618. </td>
  619. </tr>
  620. <tr>
  621. <td vAlign="bottom" rowSpan="4"><tt><font size="+1">-</font></tt></td>
  622. <td vAlign="bottom" rowSpan="4"><tt><font size="+1">mt</font></tt></td>
  623. <td colSpan="6">
  624. <table cellSpacing="2" cellPadding="2" bgColor="#cccccc" summary="" border="0">
  625. <tr>
  626. <th>
  627. &middot; Runtime</th></tr>
  628. </table>
  629. </td>
  630. </tr>
  631. <tr>
  632. <td vAlign="bottom" bgColor="#cccccc" rowSpan="3"><tt><font size="+1">-</font></tt></td>
  633. <td vAlign="bottom" bgColor="#cccccc" rowSpan="3"><tt><font size="+1">d</font></tt></td>
  634. <td colSpan="4">
  635. <table cellSpacing="2" cellPadding="2" summary="" border="0">
  636. <tr>
  637. <th>
  638. &middot; Boost Version</th></tr>
  639. </table>
  640. </td>
  641. </tr>
  642. <tr>
  643. <td vAlign="bottom" rowSpan="2"><tt><font size="+1">-</font></tt></td>
  644. <td vAlign="bottom" rowSpan="2"><tt><font size="+1">1_31</font></tt></td>
  645. <td colSpan="2">
  646. <table cellSpacing="2" cellPadding="2" bgColor="#cccccc" summary="" border="0">
  647. <tr>
  648. <th>
  649. &middot; Library Type</th></tr>
  650. </table>
  651. </td>
  652. </tr>
  653. <tr>
  654. <td vAlign="bottom" bgColor="#cccccc"><tt><font size="+1">.a</font></tt></td>
  655. <td>&nbsp;</td>
  656. </tr>
  657. </table>
  658. <h3>Library Prefix</h3>
  659. <p>The "lib" prefix on the libraries is a requirement on many platforms, like
  660. Unix, and on others like GCC running on Windows. The prefix is therefore added
  661. to all libraries on Unix type systems, and to static libraries on Windows. That
  662. is on Unix shared libraries and static libraries (object archives) are named
  663. respectively:</p>
  664. <ul>
  665. <li>
  666. <tt>lib*.so</tt>
  667. <li>
  668. <tt>lib*.a</tt>
  669. </li>
  670. </ul>
  671. <p>On Windows shared libraries do not have the prefix to differentiate the import
  672. libraries from static libraries. Consequently on Windows the libraries are
  673. named:</p>
  674. <P>
  675. <TABLE id="Table1" cellSpacing="1" cellPadding="1" width="300" border="0">
  676. <TR>
  677. <TD><FONT face="Courier New">*.dll</FONT></TD>
  678. <TD>Dynamic library version.</TD>
  679. </TR>
  680. <TR>
  681. <TD><FONT face="Courier New">*.lib</FONT>
  682. </TD>
  683. <TD>Import library for the dll.</TD>
  684. </TR>
  685. <TR>
  686. <TD><FONT face="Courier New">lib*.lib</FONT>
  687. </TD>
  688. <TD>Static library version.</TD>
  689. </TR>
  690. </TABLE>
  691. </P>
  692. <h3>Library Name</h3>
  693. <p>For Boost libraries the name has the "<tt>boost_</tt>" prefix to separate them
  694. from other libraries in your system.</p>
  695. <h3>Toolset</h3>
  696. <p>The toolset name is an abbreviation based on the compiler you are building
  697. with. The abbreviation is composed of a short, 2 to 4 characters, tag for the
  698. compiler and a version number of the compiler's major and minor revision (if
  699. available). For example if your toolset is "<tt>gcc-3_2_3</tt>" the toolset tag
  700. would be "<tt>gcc32</tt>". The toolset abbreviations used are as follows:</p>
  701. <table cellPadding="5" summary="" border="1">
  702. <tr>
  703. <td><b>TOOLS Name</b></td>
  704. <td><b>Abbreviation</b></td>
  705. </tr>
  706. <tr>
  707. <td><A href="../tools/build/v1/borland-tools.html"><code>borland</code></A></td>
  708. <td><tt>bcb</tt></td>
  709. </tr>
  710. <tr>
  711. <td><A href="../tools/build/v1/como-tools.html"><code>como</code></A></td>
  712. <td><tt>como</tt></td>
  713. </tr>
  714. <tr>
  715. <td><code><A href="../tools/build/v1/como-tools.html">como-win32</A></code></td>
  716. <td><tt>como</tt></td>
  717. </tr>
  718. <tr>
  719. <td><A href="../tools/build/v1/cw-tools.html"><code>cw</code></A></td>
  720. <td><tt>cw</tt></td>
  721. </tr>
  722. <tr>
  723. <td><A href="../tools/build/v1/darwin-tools.html"><code>darwin</code></A></td>
  724. <td><tt>osx</tt></td>
  725. </tr>
  726. <tr>
  727. <td><A href="../tools/build/v1/dmc-tools.html"><code>dmc</code></A></td>
  728. <td><tt>dmc</tt></td>
  729. </tr>
  730. <tr>
  731. <td><A href="../tools/build/v1/dmc-stlport-tools.html"><code>dmc-stlport</code></A></td>
  732. <td><tt>dmc</tt></td>
  733. </tr>
  734. <tr>
  735. <td><A href="../tools/build/v1/edg-tools.html"><code>edg</code></A></td>
  736. <td><tt>edg</tt></td>
  737. </tr>
  738. <tr>
  739. <td><A href="../tools/build/v1/gcc-tools.html"><code>gcc</code></A></td>
  740. <td><tt>gcc</tt></td>
  741. </tr>
  742. <tr>
  743. <td><A href="../tools/build/v1/gcc-stlport-tools.html"><code>gcc-stlport</code></A></td>
  744. <td><tt>gcc</tt></td>
  745. </tr>
  746. <tr>
  747. <td><A href="../tools/build/v1/gcc-nocygwin-tools.html"><code>gcc-nocygwin</code></A></td>
  748. <td><tt>gcc</tt></td>
  749. </tr>
  750. <tr>
  751. <td><A href="../tools/build/v1/intel-linux-tools.html"><code>intel-linux</code></A></td>
  752. <td><tt>il</tt></td>
  753. </tr>
  754. <tr>
  755. <td><A href="../tools/build/v1/intel-win32-tools.html"><code>intel-win32</code></A></td>
  756. <td><tt>iw</tt></td>
  757. </tr>
  758. <tr>
  759. <td><A href="../tools/build/v1/kcc-tools.html"><code>kcc</code></A></td>
  760. <td><tt>kcc</tt></td>
  761. </tr>
  762. <tr>
  763. <td><A href="../tools/build/v1/kylix-tools.html"><code>kylix</code></A></td>
  764. <td><tt>bck</tt></td>
  765. </tr>
  766. <tr>
  767. <td><A href="../tools/build/v1/mingw-tools.html"><code>mingw</code></A></td>
  768. <td><tt>mgw</tt></td>
  769. </tr>
  770. <tr>
  771. <td><A href="../tools/build/v1/mingw-stlport-tools.html"><code>mingw-stlport</code></A></td>
  772. <td><tt>mgw</tt></td>
  773. </tr>
  774. <tr>
  775. <td><A href="../tools/build/v1/mipspro-tools.html"><code>mipspro</code></A></td>
  776. <td><tt>mp</tt></td>
  777. </tr>
  778. <tr>
  779. <td><A href="../tools/build/v1/msvc-tools.html"><code>msvc</code></A></td>
  780. <td><tt>vc</tt></td>
  781. </tr>
  782. <tr>
  783. <td><A href="../tools/build/v1/msvc-stlport-tools.html"><code>msvc-stlport</code></A></td>
  784. <td><tt>vc</tt></td>
  785. </tr>
  786. <tr>
  787. <td><A href="../tools/build/v1/sunpro-tools.html"><code>sunpro</code></A></td>
  788. <td><tt>sw</tt></td>
  789. </tr>
  790. <tr>
  791. <td><A href="../tools/build/v1/tru64cxx-tools.html"><code>tru64cxx</code></A></td>
  792. <td><tt>tru</tt></td>
  793. </tr>
  794. <tr>
  795. <td><A href="../tools/build/v1/tru64cxx-tools.html"><code>tru64cxx65</code></A></td>
  796. <td><tt>tru</tt></td>
  797. </tr>
  798. <tr>
  799. <td><A href="../tools/build/v1/vacpp-tools.html"><code>vacpp</code></A></td>
  800. <td><tt>xlc</tt></td>
  801. </tr>
  802. <tr>
  803. <td><A href="../tools/build/v1/vc7-tools.html"><code>vc7</code></A></td>
  804. <td><tt>vc</tt></td>
  805. </tr>
  806. <tr>
  807. <td><A href="../tools/build/v1/vc7-stlport-tools.html"><code>vc7-stlport</code></A></td>
  808. <td><tt>vc</tt></td>
  809. </tr>
  810. <tr>
  811. <td><A href="../tools/build/v1/vc-7_1-tools.html"><code>vc-7_1</code></A></td>
  812. <td><tt>vc</tt></td>
  813. </tr>
  814. <tr>
  815. <td><A href="../tools/build/v1/vc-7_1-stlport-tools.html"><code>vc-7_1-stlport</code></A></td>
  816. <td><tt>vc</tt></td>
  817. </tr>
  818. <tr>
  819. <td>Others</td>
  820. <td>The first part of the toolset name.</td>
  821. </tr>
  822. </table>
  823. <h3>Threading</h3>
  824. <p>This tag indicates if the library is compiled with threading support. If
  825. threading is enabled "<tt>-mt</tt>" is added, otherwise nothing is added.</p>
  826. <h3>Runtime</h3>
  827. <p>This specifies the type of runtime the library was compiled against, and the
  828. type of code that is compiled. More commonly this encodes the ABI variation
  829. used in the code. For each feature of the runtime system and code compilation
  830. option a single letter is added to this tag.</p>
  831. <table cellPadding="5" summary="" border="1">
  832. <tr>
  833. <td><b>Key</b></td>
  834. <td><b>Feature</b></td>
  835. </tr>
  836. <tr>
  837. <td><tt>s</tt></td>
  838. <td>Static link to runtime.</td>
  839. </tr>
  840. <tr>
  841. <td><tt>g</tt></td>
  842. <td>Debug runtime.</td>
  843. </tr>
  844. <tr>
  845. <td><tt>y</tt></td>
  846. <td>Debug Python system.</td>
  847. </tr>
  848. <tr>
  849. <td><tt>d</tt></td>
  850. <td>Debug enabled code.</td>
  851. </tr>
  852. <tr>
  853. <td><tt>p</tt></td>
  854. <td>STLport runtime, instead of the vendor toolset runtime.</td>
  855. </tr>
  856. <tr>
  857. <td><tt>n</tt></td>
  858. <td>STLport runtime using the "native" IO streams instead of the STLport IO
  859. streams.</td>
  860. </tr>
  861. </table>
  862. <p>For example if you compile debug code for STLport using native IO streams, and
  863. statically link to the debug runtime the tag would be: "<tt>-sgdpn</tt>".</p>
  864. <h3>Boost Version</h3>
  865. <p>This is the short label for the version of the Boost Libraries. The major and
  866. minor version numbers are taken together separated by an underscore. For
  867. example version 1.31.0 would be tagged as "<tt>-1_31</tt>". The patch version
  868. number is not included because it is assumed that patch versions are upward
  869. compatible.</p>
  870. <h3>Library Type</h3>
  871. <p>The extension holds the type of library. This follows the platform
  872. requirements. On Windows this is "<tt>.dll</tt>" for shared libraries, and "<tt>.lib</tt>"
  873. for static libraries including import libraries. On Unix this is ".a" for
  874. static libraries (archives), and ".so" for shared libraries. For toolsets that
  875. support it in Unix they will also have a full version extension (for example "<tt>.so.1.31.0</tt>")
  876. with a symbolic link for the un-versioned library.</p>
  877. <H2><A name="auto-link"></A>Automatic Linking on Windows</H2>
  878. <P>For most Boost libraries that have separate source, the correct build variant
  879. is linked against automatically when you include one of that library's header
  880. files.&nbsp; For this feature to work, your compiler must support the <code>#pragma
  881. comment(lib, name)</code> feature (Microsoft Visual C++, Intel C++,
  882. Metrowerks C++ , and Borland C++ all support this).</P>
  883. <P>If you are linking to a dynamic runtime, then you can choose to link to either
  884. a static or a dynamic Boost library, the default is to do a static link.&nbsp;
  885. You can alter this for a specific library <EM>whatever</EM> by defining
  886. BOOST_WHATEVER_DYN_LINK to force Boost library <EM>whatever</EM> to be linked
  887. dynamically.&nbsp; Alternatively you can force all Boost libraries to dynamic
  888. link by defining BOOST_ALL_DYN_LINK.</P>
  889. <P>This feature can be disabled for Boost library <EM>whatever</EM> by defining
  890. BOOST_WHATEVER_NO_LIB, or for all of Boost by defining BOOST_ALL_NO_LIB.</P>
  891. <P>If you want to observe which libraries are being linked against then defining
  892. BOOST_LIB_DIAGNOSTIC will cause the auto-linking code to emit a <code>#pragma
  893. message</code> each time a library is selected for linking.</P>
  894. <P>There are some Boost libraries (<A href="../libs/test/doc/index.html">Boost.Test</A>
  895. is one one special case), where automatic linking is not supported for
  896. technical reasons: please consult the documentation for each of the libraries
  897. you are using for more information, and the <A href="../libs/config/index.html">Boost.Config</A>
  898. documentation for more information on configuration macros.&nbsp; The following
  899. table shows the current supported configurations, (Boost libraries not listed
  900. here consist of headers only):</P>
  901. <P>
  902. <TABLE id="Table2" cellSpacing="1" cellPadding="1" width="100%" border="1">
  903. <TR>
  904. <TD><STRONG>Library</STRONG></TD>
  905. <TD><STRONG>Static Link</STRONG></TD>
  906. <TD><STRONG>Dynamic Link</STRONG></TD>
  907. <TD><STRONG>Default linkage</STRONG></TD>
  908. <TD><STRONG>Automatic library selection</STRONG></TD>
  909. <TD><STRONG>Comments</STRONG></TD>
  910. </TR>
  911. <TR>
  912. <TD>Date-Time</TD>
  913. <TD>Yes</TD>
  914. <TD>Yes</TD>
  915. <TD>static</TD>
  916. <TD>Yes</TD>
  917. <TD>&nbsp;</TD>
  918. </TR>
  919. <TR>
  920. <TD>Filesystem</TD>
  921. <TD>Yes</TD>
  922. <TD>
  923. <P>Yes</P>
  924. </TD>
  925. <TD>static</TD>
  926. <TD>Yes</TD>
  927. <TD>&nbsp;</TD>
  928. </TR>
  929. <TR>
  930. <TD>Graph</TD>
  931. <TD>Yes</TD>
  932. <TD>No</TD>
  933. <TD>static</TD>
  934. <TD>No</TD>
  935. <TD>The separate Graph library source is needed only when <A href="../libs/graph/doc/read_graphviz.html">
  936. reading an AT&amp;T graphviz file.</A></TD>
  937. </TR>
  938. <TR>
  939. <TD>Iostreams</TD>
  940. <TD>Yes</TD>
  941. <TD>
  942. <P>Yes</P>
  943. </TD>
  944. <TD>static</TD>
  945. <TD>Yes</TD>
  946. <TD>&nbsp;</TD>
  947. </TR>
  948. <TR>
  949. <TD>Program Options</TD>
  950. <TD>Yes</TD>
  951. <TD>Yes</TD>
  952. <TD>static</TD>
  953. <TD>Yes</TD>
  954. <TD>&nbsp;</TD>
  955. </TR>
  956. <TR>
  957. <TD>Python</TD>
  958. <TD>Yes</TD>
  959. <TD>Yes</TD>
  960. <TD>dynamic</TD>
  961. <TD>No</TD>
  962. <TD>Since all Python extensions are DLL's it makes sense to dynamic link to the
  963. Boost Python library&nbsp;by default (static linking is only really an option
  964. if you are embedding python).</TD>
  965. </TR>
  966. <TR>
  967. <TD>Regex</TD>
  968. <TD>Yes</TD>
  969. <TD>Yes</TD>
  970. <TD>static</TD>
  971. <TD>Yes</TD>
  972. <TD>&nbsp;</TD>
  973. </TR>
  974. <TR>
  975. <TD>Serialization</TD>
  976. <TD>Yes</TD>
  977. <TD>Yes</TD>
  978. <TD>static</TD>
  979. <TD>Yes</TD>
  980. <TD>&nbsp;</TD>
  981. </TR>
  982. <TR>
  983. <TD>Signals</TD>
  984. <TD>Yes</TD>
  985. <TD>Yes</TD>
  986. <TD>static</TD>
  987. <TD>Yes</TD>
  988. <TD>&nbsp;</TD>
  989. </TR>
  990. <TR>
  991. <TD>Test</TD>
  992. <TD>Yes</TD>
  993. <TD>No</TD>
  994. <TD>static</TD>
  995. <TD>No</TD>
  996. <TD>Which library you link to depends upon which program entry point you define,
  997. rather than which Boost.Test features you use.</TD>
  998. </TR>
  999. <TR>
  1000. <TD>Thread</TD>
  1001. <TD>Partial</TD>
  1002. <TD>Yes</TD>
  1003. <TD>static (Visual C++), otherwise dynamic</TD>
  1004. <TD>Yes</TD>
  1005. <TD>For technical reasons static linking is supported on only one Windows compiler
  1006. (Visual C++).</TD>
  1007. </TR>
  1008. <TR>
  1009. <TD>Wave</TD>
  1010. <TD>Yes</TD>
  1011. <TD>Yes</TD>
  1012. <TD>static</TD>
  1013. <TD>Yes</TD>
  1014. <TD>&nbsp;</TD>
  1015. </TR>
  1016. </TABLE>
  1017. </P>
  1018. <h2><a id="Additional_Steps" name="Additional_Steps"></a>Additional Steps</h2>
  1019. <p>Depending on your platform and configuration you may need to perform some
  1020. additional configuration to get Boost to build and install.</p>
  1021. <ul>
  1022. <li>
  1023. <A href="../libs/config/config.htm#configuring">Configure the boost source code</A>.
  1024. This step should not be required on the vast majority of platforms, but if
  1025. you're trying to build Boost on an untested or unsupported platform it may be
  1026. necessary.<br>
  1027. <br>
  1028. <li>
  1029. If Boost.Build has problems detecting your Python installation it will print a
  1030. short messages about how to configure for finding the Python installation. For
  1031. more information, see these detailed <a href="../libs/python/doc/building.html#building">
  1032. instructions</a>.</li></ul>
  1033. <hr>
  1034. <p>Revised <!--webbot bot="Timestamp" s-type="EDITED"
  1035. s-format="%d %B, %Y" startspan -->
  1036. 8 November, 2004 <!--webbot bot="Timestamp" endspan i-checksum="38706" --></p>
  1037. <p>Copyright &copy; Rene Rivera 2003.<br>
  1038. Copyright &copy; Jens Maurer 2001.<BR>
  1039. Copyright &copy; John Maddock 2004.</p>
  1040. <p><small>Distributed under the Boost Software License, Version 1.0. (See
  1041. accompanying file <a href="../LICENSE_1_0.txt">LICENSE_1_0.txt</a> or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">
  1042. www.boost.org/LICENSE_1_0.txt</a>)</small></p>
  1043. </body>
  1044. </html>
粤ICP备19079148号