It is not a bug in the linker.
When you declare a long int in the header file, every time a .c includes this header file, space will be allocated for KP_P. Even if you have the #ifndef __header_file_name_h_ #define __header_file_name_h_ at the top of the file.
Here is the solution:
declare lont int KP_P in a .c file.
However, also
add
in the header file.
Now, if you include this header file, you should be able to use KP_P.
Another comment:
the define doesn't show an error, because it is essentially a copy paste operation, and the compiler is smart enough to figure it out.