Hi All,
I am facing compilation problem..The problem is like that, Let's we
have four files:
1) file_1.h
2) file_1.c
3) file_2.h
4) file_2.c
I have defined one enum in file_1.h like that:
enum (
aa_req,
aa_resp
};
and another enum in file_2.h
enum {
bb_req,
bb_resp,
aa_req,
aa_resp
};
Now there is another file let's assume Test.c which include file_2.h
and file_1.h in that order
Test.c---------------
#include<file_2.h>
#include<file_1.h>
Now my problem is that when I am compiling Test.c then I am getting
conflict ion....Can any body suggest me....
if file_2.c creates it's object file which already contains
aa_req value 2 and
aa_resp value 3
then it would be possible that if file_1.c creates it's object file
then it would over write the value of aa_req and aa_resp.
Or any other method is there....suggest me.
I am also thinking to use of header guard but this would not be more effective.
TIA
-Ravi