You must declare every variable as extern
in the .h
file, otherwise it will exist in each .c
file that include the .h
.
extern
means that the linker find the variables in another file, in you case it'll find the variables in GlobalVariables.o
Also, you need to understand that #include
insert the text of the .h
in your .c
, so each statement in the .h
is repeated in each .c
.
This is what happens to ltDK_TR_MTPulse_us
for instance: it is declared in both CEST.cpp
and CEST_UI.cpp
, so the linker sees two variables of the same name, which is forbidden.