swig官网

发布时间 2023-10-22 19:36:47作者: 2086nmj

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 supported languages also includes non-scripting languages such as C#, D, Go language, Java including Android, Lua, OCaml, Octave, Scilab and R. Also several interpreted and compiled Scheme implementations (Guile, MzScheme/Racket) 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. SWIG is free software and the code that SWIG generates is compatible with both commercial and non-commercial projects.

SWIG是一种软件开发工具,它将用C和C++编写的程序与各种高级编程语言连接起来。SWIG用于不同类型的目标语言,包括常见的脚本语言,如Javascript、Perl、PHP、Python、Tcl和Ruby。支持的语言列表还包括非脚本语言,如C#、D、Go语言、Java,包括Android、Lua、OCaml、Octave、Scilab和R。还支持几种解释和编译的Scheme实现(Guile、MzScheme/Racket)。SWIG最常用于创建高级解释或编译的编程环境、用户界面,以及作为测试和原型设计C/C++软件的工具。SWIG通常用于解析C/C++接口,并生成上述目标语言调用C/C++代码所需的“粘合代码”。SWIG还可以以XML的形式导出其解析树。SWIG是自由软件,生成的代码兼容商业和非商业项目。

https://www.swig.org/