SWIG is a software development tool that connects programs written in C and C++ with a variety of high-level programming languages.
C++ C Yacc M4 Makefile Shell Other
wsfulton Remove asserts from Python testcase
Also rename testcase python_pybuf to python_pybuffer.
Latest commit fdd2bcf Aug 12, 2018
Failed to load latest commit information.
CCache Fix -Wimplicit-fallthrough gcc-7.3 warning Mar 20, 2018
Doc Update pybuffer.i library to use new-style Python buffer C API. Aug 12, 2018
Examples Remove asserts from Python testcase Aug 12, 2018
Lib Update pybuffer.i library to use new-style Python buffer C API. Aug 12, 2018
Source Fix to make ISOC89 compliant: -Werror=declaration-after-statement Aug 10, 2018
Tools Correct Travis Ruby compilation flags Aug 7, 2018
Win The great merge Nov 30, 2002
.gitattributes Add .gitattributes file May 12, 2013
.gitignore Fix CCache documentation build and uninstall Jul 15, 2017
.travis.yml Test Python 3 -O on Travis (currently failing) Aug 10, 2018
ANNOUNCE Bump version to 4.0.0 Apr 21, 2017
CHANGES Misc. typos May 17, 2018
CHANGES.current Update pybuffer.i library to use new-style Python buffer C API. Aug 12, 2018
COPYRIGHT Another merge with master. Feb 16, 2015
INSTALL The great merge Nov 30, 2002
LICENSE merge revisions 11872:11876 from trunk to gsoc2009-sploving branch - … Mar 6, 2010
LICENSE-GPL merge revisions 11872:11876 from trunk to gsoc2009-sploving branch - … Mar 6, 2010
LICENSE-UNIVERSITIES Fix grammatical error introduced by previous fix. Jun 21, 2010
Makefile.in Remove support for PHP5 Jun 7, 2018
README Bump version to 4.0.0 Apr 21, 2017
RELEASENOTES changes file updates Jan 27, 2017
TODO PHP directors now done. WAD has been removed. Jun 3, 2011
appveyor.yml Fixes for appveyor image changes May 17, 2018
autogen.sh update some comments Nov 7, 2008
configure.ac Fix to find tclConfig.sh on more recent versions of macOS Aug 6, 2018
preinst-swig.in Stop preinst-swig.in from being executable May 22, 2016
swig.spec.in Replace references to Subversion with Git Jan 12, 2013


SWIG (Simplified Wrapper and Interface Generator)

Version: 4.0.0 (in progress)

Tagline: SWIG is a compiler that integrates C and C++ with languages
         including Perl, Python, Tcl, Ruby, PHP, Java, C#, D, Go, Lua,
         Octave, R, Scheme (Guile, MzScheme/Racket, CHICKEN), Scilab,
         Ocaml, Modula-3, Common Lisp (CLISP, Allegro CL, CFFI, UFFI)
         and Pike. SWIG can also export its parse tree into XML and
         Lisp s-expressions.

SWIG reads annotated C/C++ header files and creates wrapper code (glue
code) in order to make the corresponding C/C++ libraries available to
the listed languages, or to extend C/C++ programs with a scripting

Up-to-date SWIG related information can be found at


A SWIG FAQ and other hints can be found on the SWIG Wiki:


Please see the LICENSE file for details of the SWIG license. For
further insight into the license including the license of SWIG's
output code, please visit


Release Notes
Please see the CHANGES.current file for a detailed list of bug fixes and
new features for the current release. The CHANGES file contains bug fixes
and new features for older versions. A summary of changes in each release
can be found in the RELEASENOTES file.

The Doc/Manual directory contains the most recent set of updated
documentation for this release. The documentation is available in
three different formats, each of which contains identical content.
These format are, pdf (Doc/Manual/SWIGDocumentation.pdf), single
page html (Doc/Manual/SWIGDocumentation.html) or multiple page html
(other files in Doc/Manual). Please select your chosen format and
copy/install to wherever takes your fancy.

There is some technical developer documentation available in the
Doc/Devel subdirectory.  This is not necessarily up-to-date, but it
has some information on SWIG internals.

Documentation is also online at http://www.swig.org/doc.html.

Backwards Compatibility
The developers strive their best to preserve backwards compatibility
between releases, but this is not always possible as the overriding
aim is to provide the best wrapping experience. Where backwards
compatibility is known to be broken, it is clearly marked as an
incompatibility in the CHANGES and CHANGES.current files.

See the documentation for details of the SWIG_VERSION preprocessor
symbol if you have backward compatibility issues and need to use more
than one version of SWIG.

Please read the Doc/Manual/Preface.html#Preface_installation for
full installation instructions for Windows, Unix and Mac OS X
using the release tarball/zip file. The INSTALL file has generic
build and installation instructions for Unix users.
Users wishing to build and install code from Github should
visit http://swig.org/svn.html to obtain the more detailed
instructions required for building code obtained from Github - extra
steps are required compared to building from the release tarball.

The typical 'make -k check' can be performed on Unix operating systems.
Please read Doc/Manual/Preface.html#Preface_testing for details.

The Examples directory contains a variety of examples of using SWIG
and it has some browsable documentation.  Simply point your browser to
the file "Example/index.html".

The Examples directory also includes Visual C++ project 6 (.dsp) files for
building some of the examples on Windows. Later versions of Visual Studio
will convert these old style project files into a current solution file.

Known Issues
There are minor known bugs, details of which are in the bug tracker, see

In order to operate correctly, SWIG relies upon a set of library
files.  If after building SWIG, you get error messages like this,

    $ swig foo.i
    :1. Unable to find 'swig.swg'
    :3. Unable to find 'tcl8.swg'

it means that SWIG has either been incorrectly configured or
installed.  To fix this:

    1.  Make sure you remembered to do a 'make install' and that
        the installation actually worked.  Make sure you have
        write permission on the install directory.

    2.  If that doesn't work, type 'swig -swiglib' to find out
        where SWIG thinks its library is located.

    3.  If the location is not where you expect, perhaps
        you supplied a bad option to configure.  Use
        ./configure --prefix=pathname to set the SWIG install
        location.   Also, make sure you don't include a shell
        escape character such as ~ when you specify the path.

    4.  The SWIG library can be changed by setting the SWIG_LIB
        environment variable.  However, you really shouldn't
        have to do this.

If you are having other troubles, you might look at the SWIG Wiki at

Please report any errors and submit patches (if possible)!  We only
have access to a limited variety of hardware (Linux, Solaris, OS-X,
and Windows). All contributions help.

If you would like to join the SWIG development team or contribute a
language module to the distribution, please contact the swig-devel
mailing list, details at http://www.swig.org/mail.html.

 -- The SWIG Maintainers