getting_started.html 35 KB

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