I wish to define a global variable as a counter to record how many times a hotkey button is pressed. The files that need to use this variable are the files vlc-0.8.6f/modules/control/hotkeys.c file, vlc-0.8.6f/modules/misc/network/ipv6.c file and vlc-0.8.6f/src/libvlc.c file. As you know, all these files are from different folders, how to define a global variable across these files?
I tried to declare the variable variable in 1 of the files and in the remaining 2 files I declared it as extern. However, this didn't work for me.
The error message I get was
Does anyone have any idea on it?
Thanks.