the c code:
struct RangeResult { int bsucc; int size; const char *contents[]; };
extern struct RangeResult get_range(void*, unsigned int key, int limit, unsigned int max_limit);
the go code:
ret := C.get_range(filesdb, C.uint(1), 100, 1000) for i := 0; i < int(ret.size); i++ { fmt.Println("value:", C.GoString(ret.contents[i])) }
go build error message:
/gofilesdb.go: In function '_cgo_2e3328a0efbe_Cfunc_get_range': ./gofilesdb.go:86:7: note: the ABI of passing struct with a flexible array member has changed in GCC 4.4
how to fix this problem?