Hello All,
Our requirement is to call a function in Golang library in C++ code. Currently we are building the library using -buildmode=c-shared
.
The function in golang library is using a struct as input and output. For example like:
type Request struct {
X string
Y string
Z map[string]string
}
If I try using C struct then it doesn’t support string and map which makes it complex.
https://play.golang.org/p/Qjuu5j2nAv1
We have used protobuf to serialize and deserialize these complex structs. Is there any other alternative to this as it makes it harder to use this shared go src as library in another golang project.