c - Why doesn't CGo recognize my struct declared in a header file? -
i getting error "./test.h:10:3: error: unknown type name 'process'" when include header file test.h has struct definition process part of c go lang application. code compiles in c no problems imagine i'm doing simple incorrectly... package main // #include <sys/mman.h> // #include <errno.h> // #include <inttypes.h> // #include <stdlib.h> // #include "test.h" import "c" import ( "fmt" _"unsafe" ) func main() { fmt.println("retrieving process list"); } the contents of test.h below... #include <sys/mman.h> #include <errno.h> #include <inttypes.h> #include <stdlib.h> struct process { char *name; int os_type; addr_t address; process *next; //fields care unsigned int uid; unsigned int gid; unsigned int is_root; unsigned int io_r; unsigned int io_wr; unsigned int io_sys_r; unsigned int io_sys_wr;...