I am writing some go code that exports a function like that:
package main
import "C"
//export returnString
func returnString() string {
//
gostring := "hello world"
return gostring
}
func main() {}
I build the .so and the header file by using go build -buildmode=c-shared, but when I call returnString() in my C code, I get "panic: runtime error: cgo result has Go pointer"
Is there a way to to this in go 1.9?