Hi, I have a shared lib as bellow:
/* #include <stdint.h> struct Media { char* Name; char* Path; uint64_t Size; }; */ import "C" //export GetMediaFromDB func GetMediaFromDB(filename *C.char) *C.struct_Media { c_struct_media := &C.struct_Media{} return c_struct_media } Which is called in another program written by C, but when it's running it report error: panic: runtime error: cgo result has Go pointer Could you help with the correct way to return a struct from Go ? Many thanks. Thanks, Song -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.