swig
Generate bindings between C/C++ code and various high level languages such as JavaScript, Python, C#, and more. It uses special
.ior.swgfiles to generate the bindings (C/C++ with SWIG directives), then outputs a C/C++ file that contains all the wrapper code needed to build an extension module. More information: https://www.swig.org/Doc4.4/SWIGDocumentation.html#SWIG_nn2.
- Generate a binding between C++ and Python:
swig -c++ -python -o
- Generate a binding between C++ and Go:
swig -go -cgo -intgosize 64 -c++
- Generate a binding between C and Java:
swig -java
- Generate a binding between C and Ruby and prefix the Ruby module with
foo::bar:::
swig -ruby -prefix ""
来源:tldr-pages contributors · 作者与贡献记录 · CC BY 4.0。离线整理了版式、链接和媒体显示。
