getting_started.html 38 KB

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