I'm writing a code for a radio, which contains many child functions and header functions. I've created two headers "simulation_params.h" in which the simulation parameters can be changed, and "global_constants.h", where the look up tables are present. I need to use these two headers at multiple places in my program.
So when I define these headers in two different functions say "main.c" and "scrambling.c". the compiler is showing error, saying "first defined here", "multiple definition of x". I used ifndef and #define in my headers . nevertheless it is showing this error.