GoCxx
is a (still experimental) tool to automatically generate Go
bindings from any C/C++
library using GCC-XML informations.
Eventually, its plugin system should allow to support the generation
of Go
bindings from various sources (CLang
, SWIG-XML
, ...)
Its plugin system should also allow to generate bindings for other
languages than just Go
.
For the moment, only the generation of Go
code for the gc
compiler
is supported (gccgo
is planned though.)
What works (ie: has been tested and has regression tests):
- simple functions
- overloaded functions
- simple classes
- classes with simple inheritance
- classes with overloaded methods
- handling of C strings (ie:
const char*
)
Other C++
features may work (by pure chance) but have not been
tested yet.
Go under go-cxxdict/tests
and run:
$ ./run.sh
:: tests: basics cxx-oop
:: running test [basics]...
:: running test [basics]...[ok]
:: running test [cxx-oop]...
:: running test [cxx-oop]...[ok]