1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83
|
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Chapter5.Common tasks</title>
<link rel="stylesheet" href="../boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.69.1">
<link rel="start" href="../index.html" title="Boost.Build V2 User Manual">
<link rel="up" href="../index.html" title="Boost.Build V2 User Manual">
<link rel="prev" href="advanced/build_process.html" title="The Build Process">
<link rel="next" href="tasks/libraries.html" title="Libraries">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr><td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../boost.png"></td></tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="advanced/build_process.html"><img src="../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="tasks/libraries.html"><img src="../../../doc/html/images/next.png" alt="Next"></a>
</div>
<div class="chapter" lang="en">
<div class="titlepage"><div><div><h2 class="title">
<a name="bbv2.tasks"></a>Chapter5.Common tasks</h2></div></div></div>
<div class="toc">
<p><b>Table of Contents</b></p>
<dl>
<dt><span class="section"><a href="tasks.html#bbv2.tasks.programs">Programs</a></span></dt>
<dt><span class="section"><a href="tasks/libraries.html">Libraries</a></span></dt>
<dt><span class="section"><a href="tasks/alias.html">Alias</a></span></dt>
<dt><span class="section"><a href="tasks/installing.html">Installing</a></span></dt>
<dt><span class="section"><a href="builtins/testing.html">Testing</a></span></dt>
<dt><span class="section"><a href="builtins/raw.html">Custom commands</a></span></dt>
<dt><span class="section"><a href="reference/precompiled_headers.html">Precompiled Headers</a></span></dt>
<dt><span class="section"><a href="reference/generated_headers.html">Generated headers</a></span></dt>
</dl>
</div>
<p>This section describes main targets types that Boost.Build supports
of-of-the-box. Unless otherwise noted, all mentioned main target rules
have the common signature, described in <a href="advanced/targets.html" title="Declaring Targets">the section called “Declaring Targets”</a>.
</p>
<div class="section" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="bbv2.tasks.programs"></a>Programs</h2></div></div></div>
<a class="indexterm" name="id2589735"></a><p>Programs are created using the <code class="computeroutput">exe</code> rule, which
follows the <a href="advanced/targets.html#bbv2.main-target-rule-syntax">common
syntax</a>. For example:
</p>
<pre class="programlisting">
exe hello : hello.cpp some_library.lib /some_project//library
: <threading>multi
;
</pre>
<p>
This will create an executable file from the sources -- in this case,
one C++ file, one library file present in the same directory, and
another library that is created by Boost.Build. Generally, sources
can include C and C++ files, object files and libraries. Boost.Build
will automatically try to convert targets of other types.
</p>
<div class="tip"><table border="0" summary="Tip">
<tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Tip]" src="../../../doc/html/images/tip.png"></td>
<th align="left">Tip</th>
</tr>
<tr><td align="left" valign="top"><p>
On Windows, if an application uses dynamic libraries, and both
the application and the libraries are built by Boost.Build, its not
possible to immediately run the application, because the
<code class="literal">PATH</code> environment variable should include the path
to the libraries. It means you have to either add the paths
manually, or place the application and the libraries to the same
directory. See <a href="tasks/installing.html" title="Installing">the section called “Installing”</a>.
</p></td></tr>
</table></div>
</div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><small></small></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="advanced/build_process.html"><img src="../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="tasks/libraries.html"><img src="../../../doc/html/images/next.png" alt="Next"></a>
</div>
</body>
</html>
|