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.
extern long int KP_P;
in the header file.
Now, if you include this header file, you should be able to use KP_P.
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.