5sxsog
Last Updated: February 25, 2016
·
4.482K
· burke
582037f79cc8b997eed3c2e55980d474

Wrapping C++ with Go

c
go

cgo makes it very easy to wrap C with Go and compile them together, but it's not really apparent how to compile C++ into Go.

This repo has a simple demo of how to wrap a C++ class in C, which you can call with cgo, and a Makefile to link the C++ objects into the Go application (the Go toolchain won't do this without some convincing).

https://github.com/burke/howto-go-with-cpp