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

Error L104

I created a simple program to make an LED dice. But I got the following error and warning messages. I searched everywhere but could't find the reason for it.

Build target 'Target 1'
compiling dice.c...
linking...
*** ERROR L104: MULTIPLE PUBLIC DEFINITIONS SYMBOL: MAIN MODULE: dice.obj (DICE)
*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS SEGMENT: ?PR?MAIN?DICE
Program Size: data=11.0 xdata=0 code=222
Target not created

My code is as follows...

#include<AT892051.h>

#define ON 0
#define ALL_OFF 0xFF

sbit button =P3^0;
sbit D1 = P1^0;
sbit D2 = P1^1;
sbit D3 = P1^2;
sbit D4 = P1^3;
sbit D5 = P1^4;
sbit D6 = P1^5;
sbit D7 = P1^6;

void wait_sec()
{ unsigned int x;
for(x=0;x<33000;x++);

}

main()
{ int DICE =0;

for(;;)
{ if(button==0)
{ switch (DICE)
{ case 1: D4=ON; break;

case 2: D3=ON; D5=ON; break;

case 3: D3=ON; D4=ON; D5=ON; break;

case 4: D1=ON; D2=ON; D6=ON; D7=ON; break;

case 5:

D1=ON; D2=ON; D6=ON; D7=ON; D4=ON; break;

case 6:

D1=ON; D2=ON; D6=ON; D7=ON; D3=ON; D5=ON; break;

} wait_sec(); wait_sec();

P1=ALL_OFF;
}

else { DICE++;

if(DICE==7) DICE=1; }

}

}

0