This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

global variable/MULTIPLE PUBLIC DEFINITIONS

Hi,
I've split my project into files.
I've defined some global variables in one of the header files as follows:

unsigned char ToneDisp[16] = {'D','1','2','3','4','5','6','7','8','9','0',0x2A,0x23,'A','B','C'};
struct channel xdata Ch[16];
unsigned char CHANNELTYPE[16] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};

These variables are used in other files too.

Compiling the files individually everything goes fine while building the project results in:
*** ERROR L104: MULTIPLE PUBLIC DEFINITIONS

How can I avoid this?
Shouldn't I 've defined the global variable that way??

Thanks for your attention in advance
A.E.

0