SWIG is a Foreign Function Interface generator.

SWIG is an interface compiler that connects programs written in C and C++ with scripting languages including Perl, Python, and Tcl/Tk. It works by taking the declarations commonly found in C/C++ header files and using them to generate the glue code (wrappers) that scripting languages need to access the underlying C/C++ code.