B
burn
Hello,
i am writing a program under linux in c and compile my code with make
and gcc.
Now i have 4 files: init.c/h and packets.c/h. Each header-file contains
some:
init.h:
struct xyz
{
int a;
};
typedef struct xyz XYZ;
void fkt_1(XYZ *, ABC *);
packets.h:
struct abc
{
int b;
}
typedef struct abc ABC;
void fkt_2(XYZ *, ABC *);
Because one file is compiling before the other this one does not know
the structure from the other and i get an parser error before, let's
say, ABC.
I did some research in this newsgroup and in the internet, tried to use
"extern struct abc" or something like that but nothing worked.
Can anybody tell me what is wrong and how to fix it?
Many thanks
björn
i am writing a program under linux in c and compile my code with make
and gcc.
Now i have 4 files: init.c/h and packets.c/h. Each header-file contains
some:
init.h:
struct xyz
{
int a;
};
typedef struct xyz XYZ;
void fkt_1(XYZ *, ABC *);
packets.h:
struct abc
{
int b;
}
typedef struct abc ABC;
void fkt_2(XYZ *, ABC *);
Because one file is compiling before the other this one does not know
the structure from the other and i get an parser error before, let's
say, ABC.
I did some research in this newsgroup and in the internet, tried to use
"extern struct abc" or something like that but nothing worked.
Can anybody tell me what is wrong and how to fix it?
Many thanks
björn