/tags/rel-1.3.36/Doc/Manual/Preface.html

# · HTML · 251 lines · 199 code · 50 blank · 2 comment · 0 complexity · d3e0b2119ffdaefebadbf918f34e8630 MD5 · raw file

  1. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  2. <html>
  3. <head>
  4. <title>Preface</title>
  5. <link rel="stylesheet" type="text/css" href="style.css">
  6. </head>
  7. <body bgcolor="#ffffff">
  8. <H1><a name="Preface"></a>1 Preface</H1>
  9. <!-- INDEX -->
  10. <div class="sectiontoc">
  11. <ul>
  12. <li><a href="#Preface_nn2">Introduction</a>
  13. <li><a href="#Preface_nn3">Special Introduction for Version 1.3</a>
  14. <li><a href="#Preface_nn4">SWIG Versions</a>
  15. <li><a href="#Preface_nn5">SWIG resources</a>
  16. <li><a href="#Preface_nn6">Prerequisites</a>
  17. <li><a href="#Preface_nn7">Organization of this manual</a>
  18. <li><a href="#Preface_nn8">How to avoid reading the manual</a>
  19. <li><a href="#Preface_nn9">Backwards Compatibility</a>
  20. <li><a href="#Preface_nn10">Credits</a>
  21. <li><a href="#Preface_nn11">Bug reports</a>
  22. </ul>
  23. </div>
  24. <!-- INDEX -->
  25. <H2><a name="Preface_nn2"></a>1.1 Introduction</H2>
  26. <p>
  27. SWIG (Simplified Wrapper and Interface Generator) is a software development tool for building scripting language
  28. interfaces to C and C++ programs. Originally developed in 1995, SWIG was
  29. first used by scientists in the Theoretical Physics Division at Los Alamos National Laboratory for
  30. building user interfaces to simulation codes running on the Connection
  31. Machine 5 supercomputer. In this environment, scientists needed to
  32. work with huge amounts of simulation data, complex hardware, and a
  33. constantly changing code base. The use of a scripting language
  34. interface provided a simple yet highly flexible foundation for solving these
  35. types of problems. SWIG simplifies development by largely automating
  36. the task of scripting language integration--allowing developers and users
  37. to focus on more important problems.
  38. </p>
  39. <p>
  40. Although SWIG was originally developed for scientific applications, it
  41. has since evolved into a general purpose tool that is used in a wide
  42. variety of applications--in fact almost anything where C/C++ programming
  43. is involved.
  44. <H2><a name="Preface_nn3"></a>1.2 Special Introduction for Version 1.3</H2>
  45. <p>
  46. Since SWIG was released in 1996, its user base and applicability has
  47. continued to grow. Although its rate of development has varied, an
  48. active development effort has continued to make improvements to the
  49. system. Today, nearly a dozen developers are working to create
  50. SWIG-2.0---a system that aims to provide wrapping support for nearly
  51. all of the ANSI C++ standard and approximately ten target languages
  52. including Guile, Java, Mzscheme, Ocaml, Perl, Pike, PHP, Python, Ruby,
  53. and Tcl.
  54. </p>
  55. <H2><a name="Preface_nn4"></a>1.3 SWIG Versions</H2>
  56. <p>
  57. For several years, the most stable version of SWIG has been release
  58. 1.1p5. Starting with version 1.3, a new version numbering scheme has
  59. been adopted. Odd version numbers (1.3, 1.5, etc.) represent
  60. development versions of SWIG. Even version numbers (1.4, 1.6, etc.)
  61. represent stable releases. Currently, developers are working to
  62. create a stable SWIG-2.0 release. Don't let the development status
  63. of SWIG-1.3 scare you---it is much more stable (and capable) than SWIG-1.1p5.
  64. </p>
  65. <H2><a name="Preface_nn5"></a>1.4 SWIG resources</H2>
  66. <p>
  67. The official location of SWIG related material is
  68. </p>
  69. <div class="shell"><pre>
  70. <a href="http://www.swig.org">http://www.swig.org</a>
  71. </pre></div>
  72. <p>
  73. This site contains the latest version of the software, users guide,
  74. and information regarding bugs, installation problems, and
  75. implementation tricks.
  76. <p>
  77. You can also subscribe to the swig-user mailing list by visiting the page
  78. </p>
  79. <div class="shell"><pre>
  80. <a href="http://www.swig.org/mail.html">http://www.swig.org/mail.html</a>
  81. </pre></div>
  82. <p>
  83. The mailing list often discusses some of the more technical aspects of
  84. SWIG along with information about beta releases and future work.
  85. </p>
  86. <p>
  87. SVN access to the latest version of SWIG is also available. More information
  88. about this can be obtained at:
  89. </p>
  90. <div class="shell"><pre>
  91. <a href="http://www.swig.org/svn.html">http://www.swig.org/svn.html</a>
  92. </pre></div>
  93. <H2><a name="Preface_nn6"></a>1.5 Prerequisites</H2>
  94. <p>
  95. This manual assumes that you know how to write C/C++ programs and that you
  96. have at least heard of scripting languages such as
  97. Tcl, Python, and Perl. A detailed knowledge of these scripting
  98. languages is not required although some familiarity won't
  99. hurt. No prior experience with building C extensions to these
  100. languages is required---after all, this is what SWIG does automatically.
  101. However, you should be reasonably familiar with the use of
  102. compilers, linkers, and makefiles since making
  103. scripting language extensions is somewhat more complicated than
  104. writing a normal C program.
  105. </p>
  106. <p>
  107. Recent SWIG releases have become significantly more capable in
  108. their C++ handling--especially support for advanced features like
  109. namespaces, overloaded operators, and templates. Whenever possible,
  110. this manual tries to cover the technicalities of this interface.
  111. However, this isn't meant to be a tutorial on C++ programming. For many
  112. of the gory details, you will almost certainly want to consult a good C++ reference. If you don't program
  113. in C++, you may just want to skip those parts of the manual.
  114. <H2><a name="Preface_nn7"></a>1.6 Organization of this manual</H2>
  115. <p>
  116. The first few chapters of this manual describe SWIG in general and
  117. provide an overview of its capabilities. The remaining chapters are
  118. devoted to specific SWIG language modules and are self
  119. contained. Thus, if you are using SWIG to build Python interfaces, you
  120. can probably skip to that chapter and find almost everything you need
  121. to know. Caveat: we are currently working on a documentation rewrite and many
  122. of the older language module chapters are still somewhat out of date.
  123. </p>
  124. <H2><a name="Preface_nn8"></a>1.7 How to avoid reading the manual</H2>
  125. <p>
  126. If you hate reading manuals, glance at the "Introduction" which
  127. contains a few simple examples. These
  128. examples contain about 95% of everything you need to know to use
  129. SWIG. After that, simply use the language-specific chapters as a reference.
  130. The SWIG distribution also comes with a large directory of
  131. examples that illustrate different topics.
  132. </p>
  133. <H2><a name="Preface_nn9"></a>1.8 Backwards Compatibility</H2>
  134. <p>
  135. If you are a previous user of SWIG, don't expect recent versions of
  136. SWIG to provide backwards compatibility. In fact, backwards
  137. compatibility issues may arise even between successive 1.3.x releases.
  138. Although these incompatibilities are regrettable, SWIG-1.3 is an active
  139. development project. The primary goal of this effort is to make SWIG
  140. better---a process that would simply be impossible if the developers
  141. are constantly bogged down with backwards compatibility issues.
  142. </p>
  143. <p>
  144. On a positive note, a few incompatibilities are a small price to pay
  145. for the large number of new features that have been
  146. added---namespaces, templates, smart pointers, overloaded methods,
  147. operators, and more.
  148. </p>
  149. <p>
  150. If you need to work with different versions of SWIG and backwards
  151. compatibility is an issue, you can use the SWIG_VERSION preprocessor
  152. symbol which holds the version of SWIG being executed.
  153. SWIG_VERSION is a hexadecimal integer such as 0x010311 (corresponding to SWIG-1.3.11).
  154. This can be used in an interface file to define different typemaps, take
  155. advantage of different features etc:
  156. </p>
  157. <div class="code"><pre>
  158. #if SWIG_VERSION &gt;= 0x010311
  159. /* Use some fancy new feature */
  160. #endif
  161. </pre></div>
  162. <p>
  163. Note: The version symbol is not defined in the generated SWIG
  164. wrapper file. The SWIG preprocessor has defined SWIG_VERSION since SWIG-1.3.11.
  165. </p>
  166. <H2><a name="Preface_nn10"></a>1.9 Credits</H2>
  167. <p>
  168. SWIG is an unfunded project that would not be possible without the
  169. contributions of many people. Most recent SWIG development has been
  170. supported by Matthias K&ouml;ppe, William Fulton, Lyle Johnson,
  171. Richard Palmer, Thien-Thi Nguyen, Jason Stewart, Loic Dachary, Masaki
  172. Fukushima, Luigi Ballabio, Sam Liddicott, Art Yerkes, Marcelo Matus,
  173. Harco de Hilster, John Lenz, and Surendra Singhi.
  174. </p>
  175. <p>
  176. Historically, the following people contributed to early versions of SWIG.
  177. Peter Lomdahl, Brad Holian, Shujia Zhou, Niels Jensen, and Tim Germann
  178. at Los Alamos National Laboratory were the first users. Patrick
  179. Tullmann at the University of Utah suggested the idea of automatic
  180. documentation generation. John Schmidt and Kurtis Bleeker at the
  181. University of Utah tested out the early versions. Chris Johnson
  182. supported SWIG's developed at the University of Utah. John Buckman,
  183. Larry Virden, and Tom Schwaller provided valuable input on the first
  184. releases and improving the portability of SWIG. David Fletcher and
  185. Gary Holt have provided a great deal of input on improving SWIG's
  186. Perl5 implementation. Kevin Butler contributed the first Windows NT
  187. port.
  188. <H2><a name="Preface_nn11"></a>1.10 Bug reports</H2>
  189. <p>
  190. Although every attempt has been made to make SWIG bug-free, we are also trying
  191. to make feature improvements that may introduce bugs.
  192. To report a bug, either send mail to the SWIG developer
  193. list at the <a href="http://www.swig.org/mail.html">swig-devel mailing list</a> or report a bug
  194. at the <a href="http://www.swig.org/bugs.html">SWIG bug tracker</a>. In your report, be as specific as
  195. possible, including (if applicable), error messages, tracebacks (if a
  196. core dump occurred), corresponding portions of the SWIG interface file
  197. used, and any important pieces of the SWIG generated wrapper code. We
  198. can only fix bugs if we know about them.
  199. </p>
  200. </body>
  201. </html>