1
0

getting_started.html 53 KB

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