why Multiple define error ...
hi,
i have created a header file with guard and it looks like
somehead.h as
.
.
some #defines
.
.
const long int slim_nil = 0;
const long int SLIM_INT_MIN = (-2147483647-1);
.
.
.
and i have included this header file in two c files and thru their corresponding header
files
say ...1.c includes 1.h which includes somehead.h and
...2.c includes 2.h which includes somehead.h, now while i compiling these 1.c and 2.c file
together in gcc i receive error as
/tmp/cciaeWli.o(.rodata+0x0): multiple definition of `slim_nil'
/tmp/cc0QuOGU.o(.rodata+0x0): first defined here
/tmp/cciaeWli.o(.rodata+0x4): multiple definition of `SLIM_INT_MIN'
/tmp/cc0QuOGU.o(.rodata+0x4): first defined here
/tmp/cciaeWli.o(.rodata+0x8): multiple definition of `SLIM_INT_MAX'
but here i wonder, why it is not saying multiple defines for the #defines
whats wrong!
Sorry!, if it is something silly that i dont know...