I have a problem when trying to compile a program with multiple modules. I've made an Abstract Data Type and placed all the declarations and function prototypes into a header "hwconf.h" . The implementation of the ADT is in a different file "hwconf.c" where I included the header. To test this module I've made a simple program "cli.c".
The problem is that when I try to compile the whole program I get a linker error, seeing multiple declarations of the constants defined in "hwconf.h". I tried to figure out what's wrong and I found out that the C compiler , unlike the c++ one, it actualy allocates memory for the constants. How can I avoid the linker error, without usig the "#define" dirrective ? What are the standards for C headers?