getting_started.html 36 KB

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