Welcome to SWIG
[ Chinese ]
SWIG is a software development tool that connects programs written in
C and C++ with a variety of high-level programming
languages. SWIG is used with different types of target languages including common scripting languages such as
supported languages also includes
non-scripting languages such as C#, Common Lisp (CLISP, Allegro CL, CFFI, UFFI), D, Go language,
Java including Android, Lua, Modula-3, OCAML, Octave, Scilab and R.
Also several interpreted and compiled Scheme implementations (Guile, MzScheme/Racket, Chicken)
are supported. SWIG is most
commonly used to create high-level interpreted or compiled programming
environments, user interfaces, and as a tool for testing and prototyping C/C++ software.
SWIG is typically used to parse C/C++ interfaces and generate the 'glue code' required for the above target languages to call into the C/C++ code.
SWIG can also export its parse tree in the form of XML and Lisp s-expressions.
SWIG is free software and the code that SWIG generates is compatible with both commercial and non-commercial projects.
- 2017/01/28 - SWIG-3.0.12 released
- Add support for Octave-4.2.
- Enhance %extend to support template functions.
- Language specific enhancements and fixes for C#, D, Guile, Java, PHP7.
- 2016/12/29 - SWIG-3.0.11 released
- PHP 7 support added.
- C++11 alias templates and type aliasing support added.
- 2016/06/12 - SWIG-3.0.10 released
This release fixes a couple of important regressions in SWIG-3.0.9 for smart pointers and importing Python modules.
- 2016/05/29 - SWIG-3.0.9 released
Summary of changes in SWIG-3.0.9
- Add support for Python's implicit namespace packages.
- Fixes to support Go 1.6.
- C++11 std::array support added for Java.
- Improved C++ multiple inheritance support for Java/C# wrappers.
- 2015/12/31 - SWIG-3.0.8 released
- pdf documentation enhancements.
- Various Python 3.5 issues fixed.
- std::array support added for Ruby and Python.
- shared_ptr support added for Ruby.
- Minor improvements for CFFI, Go, Java, Perl, Python, Ruby.
- 2015/08/03 - SWIG-3.0.7 released
SWIG-3.0.7 release summary:
Add support for Octave-4.0.0.
Remove potential Android security exploit in generated Java classes.
* Minor new features and bug fixes.
- 2015/07/05 - SWIG-3.0.6 released
SWIG-3.0.6 is mostly a stability release.
- Stability and regression fixes.
- Fixed parsing of C++ corner cases.
- Language improvements and bug fixes for C#, Go, Java, Lua, Python, R.
- 2015/03/07 - Defending the GPL
SWIG is a proud member of the Software Freedom Conservancy who has recently announced that they will be supporting a lawsuit to defend an alleged violation of the GNU General Public License (GPL). Ensuring this software license, the same one that protects the SWIG source code, is not abused and is actively defended in a court of law is important for everyone using the license.
Conservancy is supporting Christoph Hellwig's lawsuit against VMware over GPL violations on Linux. VMware have stated that they would not comply with the GPL after many patient years of negotiations by Christoph and the Conservancy. More information is in the Conservancy's FAQ on the lawsuit.
If you have benefited or enjoyed the fruits of SWIG, it is because the SWIG developer's chose to use a software license to ensure it remains freely available. Please consider supporting Christoph and Conservancy including their fund raising appeal to defend our license.
SWIG lead maintainer
- 2015/02/01 - SWIG-3.0.5 released
We are pleased to announce SWIG-3.0.5 has been released with the addition of support for Scilab.
This version also contains:
- An important Python fix for a regression in SWIG-3.0.3 when wrapping C++ default arguments.
- Minor improvements for C#, Go, Octave, PHP and Python.
SWIG-3.0.4 was also released recently and contained part of the Python fix for the regression mentioned above. Python users should definitely rather use 3.0.5.
- 2014/12/31 - SWIG-3.0.3 released
SWIG-3.0.3 release summary:
- Add support for C++11 strongly typed enumerations.
- Numerous bug fixes and minor enhancements for C#, D, Go, Java,
More detailed release notes can be seen at http://swig.org/release.html
Feedback and questions concerning this site should be posted to the swig-devel mailing list.
Last modified : Sat May 13 14:25:49 2017