Simplified Wrapper and Interface Generator

2015 年 5 月 7 日3760

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

Javascript, Perl, PHP, Python, Tcl and Ruby. The list of

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.

Download the latest version.

Documentation, papers, and presentations

Features.

Mailing Lists

Bug tracking

SwigWiki!

Recent News

SWIG RSS Feed

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.

William Fulton

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,

Javascript, PHP, Perl and Python wrappers.

More detailed release notes can be seen at http://http://www.zjjv.com///release.html

2014/06/04 - SWIG-3.0.2 released

This release has been made to fix a bug during installation, but it also includes a couple of other rather minor changes.

2014/05/27 - SWIG-3.0.1 released

SWIG-3.0.1 is another milestone release as it is the first version to contain support for Javascript.

Release summary:

2014/03/16 - SWIG-3.0.0 released

This is a major new release focusing primarily on C++ improvements.

C++11 support added. Please see documentation for details of supported

features: http://http://www.zjjv.com///Doc3.0/CPlusPlus11.html

Nested class support added. This has been taken full advantage of in

Java and C#. Other languages can use the nested classes, but require

further work for a more natural integration into the target language.

We urge folk knowledgeable in the other target languages to step

forward and help with this effort.

C# .NET 2 support is now the minimum. Generated using statements are

replaced by fully qualified names.

Bug fixes and improvements to the following languages:

C#, Go, Guile, Java, Lua, Perl, PHP, Python, Octave, R, Ruby, Tcl

Various other bug fixes and improvements affecting all languages.

Note that this release contains some backwards incompatible changes

in some languages.

Full detailed release notes are in the changes file.

See http://http://www.zjjv.com///release.html.

2014/02/09 - SWIG-2.0.12 released

SWIG-2.0.12 summary:

- This is a maintenance release backporting some fixes from the pending 3.0.0 release.

- Octave 3.8 support added.

- C++11 support for new versions of erase/insert in the STL containers.

- Compilation fixes on some systems for the generated Lua, PHP, Python and R wrappers.

2013/09/15 - SWIG-2.0.11 released

SWIG-2.0.11 summary:

- Minor bug fixes and enhancements mostly in Python, but also

C#, Lua, Ocaml, Octave, Perl, PHP, Python, R, Ruby, Tcl.

2013/05/27 - SWIG-2.0.10 released

SWIG-2.0.10 summary:

- Ruby 1.9 support is now complete.

- Add support for Guile 2.0 and Guile 1.6 support (GH interface) has

been dropped.

- Various small language neutral improvements and fixes.

- Various bug fixes and minor improvements specific to C#, CFFI, D,

Java, Octave, PHP, Python,

- Minor bug fix in ccache-swig.

- Development has moved to Github with Travis continuous integration

testing - patches using https://github.com/swig/swig are welcome.

2013/05/03 - SWIG license explanation

We have recently updated the SWIG legal page to provide clarification on the SWIG license. There has been some confusion as to how the GPL license may or may not affect the code generated by SWIG. Please take a look at the updated SWIG legal page.

We are indebted to the Software Freedom Law Center for all the help given in providing the legal explanations and for originally helping set up the license for version 2.0.

More news


Feedback and questions concerning this site should be posted to the swig-devel mailing list.

Last modified : Sat Jan 31 22:26:25 2015

0 0