Hi Everyone,
I am doing a project in C and I have a problem with building it. It is:
I have two separate sub systems[A and B] in my project that use the functionality of yet another sub system[C]. To do this, they #include the header files necessary. The obligation is that both the sub systems[A and B] have to be built separately, by which I mean that I have two separate 'Makefile's for the subsystems and I run 'make' on each separately.
Now, when I try to unite all my subsystems[A,B,C] into one single project, gcc tells that some functions are already declared and these functions belong to subsystem C.
I realize that header files are included at compile time, i.e., when I use 'make' on the sub systems[A and B]. So, when I am trying to unite all of them, they are actually being double declared.
Can someone help me with a solution to this? Any solution, that does not require me to compile both the sub systems[A and B] together will be good.