[c] struct forward declaration in header - dsindex/blog GitHub Wiki
1. header1.h in library
typedef struct ac_obj {
...
} ac_obj_t;
2. header2.h
// forward declaration
struct ac_obj;
...
typedef struct res {
struct ac_obj* aho;
} res_t;
...
void func(struct ac_obj* aho);
3. code2.c
void func(ac_obj_t* aho) {
...
}