I wanted to know how to make a structure visible in both - inside a library & in a external header. let me try to explain in the following code
I have a struct :
typedef struct{
int a;
int b;
}strt_1;
i want to create an instance of the same in the application and pass it to a library function and later update a & b variables inside, hence
application
int main()
{
strt_1 a;
foo(&a);
}
inside the library:
int foo(strt_1 *a)
{
a->b = 0;
a->a = 1;
}
problem: if I create the definition of the struct in the library, when I retype the same in application, it shows as a redifinition(obviously). but if I type it in application, I wont be able to compile it as it says definition missing, Soo, how do I show the contents of the Struct to the external 3rd party library user, and also make it visible to the library compiler?