getting_started.html 40 KB

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