when export go func to c, the interface type port to GoInterface, and int to GoInt. How to port my c funcs to go with these types?
a.h
void *SomeFunc(GoInterface arg);
a.c
void *SomeFunc(GoInterface arg) {
}
a.go
package main
// #include "a.h"
import "C"
type A struct {
}
func main() {
var a = new(A)
}
when I go build:
cc errors for preamble:
In file included from ./a.go:3:0:
a.h:1:16: error: unknown type name 'GoInterface'
void *SomeFunc(GoInterface arg)
Is there a header file for go like jni.h for java, So I can include there types.