PageRenderTime 238ms CodeModel.GetById 32ms RepoModel.GetById 0ms app.codeStats 0ms

/libs/iostreams/doc/installation.html

https://github.com/dabrahams/boost-svn
HTML | 182 lines | 158 code | 19 blank | 5 comment | 0 complexity | 873f0a224c0220fa5ecfdd81b3e5a5ac MD5 | raw file
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  2. <HTML>
  3. <HEAD>
  4. <TITLE>Installation</TITLE>
  5. <LINK REL="stylesheet" HREF="../../../boost.css">
  6. <LINK REL="stylesheet" HREF="theme/iostreams.css">
  7. </HEAD>
  8. <BODY>
  9. <!-- Begin Banner -->
  10. <H1 CLASS="title">Installation</H1>
  11. <HR CLASS="banner">
  12. <!-- End Banner -->
  13. <DL class="page-index">
  14. <DT><A HREF="#overview">Overview</A>
  15. <DT><A HREF="#ide">Building with an IDE or Makefile</A>
  16. <DT><A HREF="#bjam">Building with Boost.Build</A>
  17. </DL>
  18. <A NAME="overview"></A>
  19. <H2>Overview</H2>
  20. <P>
  21. Most of Boost.Iostreams can be used simply by including appropriate headers. This is true, for instance, of all the <A HREF="quick_reference.html#core">core components</A> &#8212; including <A HREF="guide/generic_streams.html#stream"><CODE>stream</CODE></A>, <A HREF="guide/generic_streams.html#stream_buffer"><CODE>stream_buffer</CODE></A>, <A HREF="classes/filtering_stream.html"><CODE>filtering_stream</CODE></A> and <A HREF="classes/filtering_streambuf.html"><CODE>filtering_streambuf</CODE></A> &#8212; and of about two thirds of the concrete <A HREF="quick_reference.html#filters">Filters</A> and <A HREF="quick_reference.html#devices">Devices</A>.
  22. Some components, however, are implemented in <CODE>.cpp</CODE> files; in addition, the <A HREF="classes/regex_filter.html">regular expression filters</A> depend on <A HREF="../../regex/index.html" TARGET="_top">Boost.Regex</A>, and the compressions filters rely on the third-party libraries zlib (<A CLASS='bib_ref' NAME='gailly' HREF="bibliography.html#gailly"'>[Gailly]</A>) and libbz2 (<A CLASS='bib_ref' NAME='seward' HREF="bibliography.html#seward"'>[Seward]</A>). To obatin zlib and libbz2, see the instructions <A HREF="classes/zlib.html#installation">here</A> and <A HREF="classes/bzip2.html#installation">here</A>.
  23. </P>
  24. <P>
  25. The components which are implemented in <CODE>.cpp</CODE> or which rely on external libraries can be built in two ways: by adding the appropriate <CODE>.cpp</CODE> files to your IDE project or makefile, or by using <A HREF="../../../tools/build/index.html" TARGET="_top">Boost.Build</A>.
  26. </P>
  27. <A NAME="ide"></A>
  28. <H2>Building with an IDE or Makefile</H2>
  29. <P>
  30. The following table shows which headers contain components defined in <CODE>.cpp</CODE> files. If your application includes one of these headers, you'll need to add the corresponding <CODE>.cpp</CODE> files to you IDE project or makefile, and to define the preprocessor symbol <CODE>BOOST_IOSTREAMS_NO_LIB</CODE>. In addition, if the <CODE>.cpp</CODE> file depends on an external library, you'll have to build it from the source or link to a pre-built binary.
  31. </P>
  32. <TABLE CELLPADDING=5 BORDER=1>
  33. <TR><TH>Header</TH><TH>Source File</TH><TH WIDTH=200>External Library</TH></TR>
  34. <TR>
  35. <TD><A HREF="../../../boost/iostreams/device/file_descriptor.hpp"><CODE>boost/iostreams/device/file_descriptor.hpp</CODE></A></TD> <TD><A HREF="../../../libs/iostreams/src/file_descriptor.cpp"><CODE>file_descriptor.cpp</CODE></A></TD>
  36. <TD STYLE='padding-left:1.5em'>-</TD>
  37. </TR>
  38. <TR>
  39. <TD><A HREF="../../../boost/iostreams/device/mapped_file.hpp"><CODE>boost/iostreams/device/mapped_file.hpp</CODE></A></TD>
  40. <TD><A HREF="../../../libs/iostreams/src/mapped_file.cpp"><CODE>mapped_file.cpp</CODE></A></TD>
  41. <TD STYLE='padding-left:1.5em'>-</TD>
  42. </TR>
  43. <TR>
  44. <TD><A HREF="../../../boost/iostreams/filter/bzip2.hpp"><CODE>boost/iostreams/filter/bzip2.hpp</CODE></A></TD>
  45. <TD><A HREF="../../../libs/iostreams/src/bzip2.cpp"><CODE>bzip2.cpp</CODE></A></TD>
  46. <TD STYLE='padding-left:1.5em'>libbz2</TD>
  47. </TR>
  48. <TR>
  49. <TD><A HREF="../../../boost/iostreams/filter/gzip.hpp"><CODE>boost/iostreams/filter/gzip.hpp</CODE></A></TD>
  50. <TD><A HREF="../../../libs/iostreams/src/gzip.cpp"><CODE>gzip.cpp</CODE></A>, <A HREF="../../../libs/iostreams/src/zlib.cpp"><CODE>zlib.cpp</CODE></A></TD>
  51. <TD STYLE='padding-left:1.5em'>zlib</TD>
  52. </TR>
  53. <TR>
  54. <TD><A HREF="../../../boost/iostreams/filter/regex.hpp"><CODE>boost/iostreams/filter/regex.hpp</CODE></A></TD>
  55. <TD STYLE='padding-left:1em'>-</TD>
  56. <TD STYLE='padding-left:1.5em'><A HREF="../../regex/index.html" TARGET="_top">Boost.Regex</A></TD>
  57. </TR>
  58. <TR>
  59. <TD><A HREF="../../../boost/iostreams/filter/zlib.hpp"><CODE>boost/iostreams/filter/zlib.hpp</CODE></A></TD>
  60. <TD><A HREF="../../../libs/iostreams/src/zlib.cpp"><CODE>zlib.cpp</CODE></A></TD>
  61. <TD STYLE='padding-left:1.5em'>zlib</TD>
  62. </TR>
  63. </TABLE>
  64. <A NAME="bjam"></A>
  65. <H2>Building with Boost.Build</H2>
  66. <P>
  67. To build with <A HREF="../../../tools/build/v2/index.html" TARGET="_top">Boost.Build</A>, run <I>bjam</I> from the directory <CODE>libs/iostreams/build</CODE>, or from the Boost root directory. If you want to use the compression filters, you may need to set several Boost.Build variables indicating where the source files or pre-built binaries are located. These variables are summarized in the following table.
  68. </P>
  69. <P>
  70. On most UNIX systems, it should not be necessary to set any of these variables, since the zlib and libbz2 headers and binaries are already installed in locations where they will be found automatically. On Windows, the zlib and bzip2 filters are disabled by default; to enable support for these filters, you will need to set variables indicating the location of the source files, if building from the source, or the location of the headers and binaries, if using pre-built binaries.
  71. </P>
  72. <TABLE STYLE="margin-bottom:1em" BORDER="1" CELLPADDING="6" CELLSPACING="1">
  73. <TR>
  74. <TH>Variable</TH><TH>Interpretation</TH><TH>Default</TH>
  75. </TR>
  76. <TR>
  77. <TD><CODE>NO_COMPRESSION</CODE></TD>
  78. <TD>
  79. Disable support for compression filters.
  80. </TD>
  81. <TD ALIGN="center">-</TD>
  82. </TR>
  83. <TR>
  84. <TD><CODE>NO_BZIP2</CODE></TD>
  85. <TD>
  86. Disable support for the bzip2 filters.
  87. </TD>
  88. <TD><CODE>1</CODE> (Windows)</TD>
  89. </TR>
  90. <TR>
  91. <TD><CODE>BZIP2_BINARY</CODE></TD>
  92. <TD>
  93. Name of the libbz2 binary, not including the file extension, or the "lib" prefix on UNIX. On Windows, if linking with a dynamic build of libbz2, specify the name of the import library.
  94. </TD>
  95. <TD><CODE>bz2</CODE>&nbsp;(UNIX)<BR><CODE>libbz2</CODE>&nbsp;(Windows)</TD>
  96. </TR>
  97. <TR>
  98. <TD><CODE>BZIP2_INCLUDE</CODE></TD>
  99. <TD>
  100. Path to the libbz2 headers, if they're not in a location where they'll be found automatically.
  101. </TD>
  102. <TD><CODE>BZIP2_SOURCE</CODE></TD>
  103. </TR>
  104. <TR>
  105. <TD><CODE>BZIP2_LIBPATH</CODE></TD>
  106. <TD>
  107. Path to the libbz2 binary, if it's not in a location where it will be found automatically. On Windows, if linking with a dynamic build of libbz2, specify the path to the import library.
  108. </TD>
  109. <TD ALIGN="center">-</TD>
  110. </TR>
  111. <TR>
  112. <TD><CODE>BZIP2_SOURCE</CODE></TD>
  113. <TD>
  114. Path to the libbz2 source files, if they're not in a location where they'll be found automatically.
  115. </TD>
  116. <TD ALIGN="center">-</TD>
  117. </TR>
  118. <TR>
  119. <TD><CODE>NO_ZLIB</CODE></TD>
  120. <TD>
  121. Disable support for the zlib filters.
  122. </TD>
  123. <TD><CODE>1</CODE> (Windows)</TD>
  124. </TR>
  125. <TR>
  126. <TD><CODE>ZLIB_BINARY</CODE></TD>
  127. <TD>
  128. Name of the zlib binary, not including the file extension, or the "lib" prefix on UNIX. On Windows, if linking with a dynamic build of zlib, specify the name of the import library.
  129. </TD>
  130. <TD><CODE>z</CODE>&nbsp;(UNIX)<BR><CODE>zdll</CODE>&nbsp;(Windows)</TD>
  131. </TR>
  132. <TR>
  133. <TD><CODE>ZLIB_INCLUDE</CODE></TD>
  134. <TD>
  135. Path to the zlib headers, if they're not in a location where they'll be found automatically.
  136. </TD>
  137. <TD><CODE>ZLIB_SOURCE</CODE></TD>
  138. </TR>
  139. <TR>
  140. <TD><CODE>ZLIB_LIBPATH</CODE></TD>
  141. <TD>
  142. Path to the zlib binary, if it's not in a location where it will be found automatically. On Windows, if linking with a dynamic build of zlib, specify the path to the import library.
  143. </TD>
  144. <TD ALIGN="center">-</TD>
  145. </TR>
  146. <TR>
  147. <TD><CODE>ZLIB_SOURCE</CODE></TD>
  148. <TD>
  149. Path to the zlib source files, if they're not in a location where they'll be found automatically.
  150. </TD>
  151. <TD ALIGN="center">-</TD>
  152. </TR>
  153. </TABLE>
  154. <!-- End Footnotes -->
  155. <!-- Begin Footer -->
  156. <HR>
  157. <P CLASS="copyright">Revised 02 Feb 2008</P>
  158. <P CLASS="copyright">&copy; Copyright 2008 <a href="http://www.coderage.com/" target="_top">CodeRage, LLC</a><br/>&copy; Copyright 2004-2007 <a href="http://www.coderage.com/turkanis/" target="_top">Jonathan Turkanis</a></P>
  159. <P CLASS="copyright">
  160. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at <A HREF="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</A>)
  161. </P>
  162. <!-- End Footer -->
  163. </BODY>