Code:
abc.h
struct STRUCT_ABC {
int a;
};
abc.c
#include "abc.h"
void abc(struct STRUCT_ABC *a)
{
}
def.c
struct STRUCT_ABC {
char *s;
double x;
};
void def(struct STRUCT_ABC *a) // if you export def() function,
problem since compile will use struct STRUCT_ABC defined in abc.h
{
}
main.c
#include "abc.h" //include struct def
int main(void)
{
struct STRUCT_ABC foo;
def(&foo); // problem!!
abc(&foo); // OK
return 0;
}
You can not export any function defined in def.c that needs struct STRUCT_ABC. (i.e functions that take STRUCT_ABC as para or return STRUCT_ABC).