I am trying to minimize the interdependence of #include files as a general practice.
In xxx.h I have:
struct my_struct;
void funct(struct my_struct* ms);
How to make a similar partial declaration using a typedef'd structure? I have an actual declaration in some third #include that looks like (e.g. yyy.h):
typedef struct my_data_s {
int ival;
... struct other components ...
} my_data_t;
I just need a decl representative in xxx.h that references typedef:
typedef struct my_data_s my_data_t;
void funct2(my_data_t* md);
This attempt causes a "typedef error override my_data_t". (Using gcc 4.4.3 / Ubuntu 10.4) Other random search attempts (like add '{}' to typedef) also give errors.
, , , , . , /.
, . , (?!) ( , # yyy.y , #include xxx.h - .) .