I'm getting the following when I compile:
Warning : external/internal linkage conflict with previous declaration HARDWARE.c line 52 static unsigned char digitalInput1TimerEnable = FALSE;
I have a file named HARDWARE.c that contains this line of code:
static unsigned char digitalInput1TimerEnable = FALSE;
and also a HARDWARE.h header file that contains this line of code:
extern unsigned char digitalInput1TimerEnable;
This variable is not defined anywhere else in my code. Why would I be getting this warning?
已解决! 转到解答。
static variables can not be exported to other C files with extern. static's are always private to the C file, you define them in. Either remove static keyword from variable definition or extern from declaration. Your favorite C book should tell you the same.
static variables can not be exported to other C files with extern. static's are always private to the C file, you define them in. Either remove static keyword from variable definition or extern from declaration. Your favorite C book should tell you the same.