avr单片机c语言编程时,不管怎么编程都出现错误 multiple define: '_main'(单片机类型已经选定) 10
例如:#include<iom16v.h>voidmain(void){DDRD=0XFF;PORTD=0XF5;}编译时出现错误信息C:\iccv7avr\bin\im...
例如:#include<iom16v.h>
void main(void)
{
DDRD=0XFF;
PORTD=0XF5;
}
编译时出现错误信息
C:\iccv7avr\bin\imakew -f 2.mak
iccavr -c -IC:\iccv7avr\include\ -e -D__ICC_VERSION=722 -DATMega16 -l -g -MLongJump -MHasMul -MEnhanced ..\..\..\..\DOCUME~1\Administrator\MYDOCU~1\avr\3.C
!W C:\DOCUME~1\Administrator\MYDOCU~1\avr\3.C(3):[warning] old-style function definition for `main'
iccavr -o 2 -LC:\iccv7avr\lib\ -g -e:0x4000 -ucrtatmega.o -bfunc_lit:0x54.0x4000 -dram_end:0x45f -bdata:0x60.0x45f -dhwstk_size:30 -beeprom:0.512 -fihx_coff -S2 @2.lk -lcatmega
!E 3.o(14): multiple define: '_main'
!E 4.o(37): multiple define: '_main'
C:\iccv7avr\bin\imakew.exe: Error code 1
Done: there are error(s). Exit code: 1. Fri Mar 09 11:14:31 2012 展开
void main(void)
{
DDRD=0XFF;
PORTD=0XF5;
}
编译时出现错误信息
C:\iccv7avr\bin\imakew -f 2.mak
iccavr -c -IC:\iccv7avr\include\ -e -D__ICC_VERSION=722 -DATMega16 -l -g -MLongJump -MHasMul -MEnhanced ..\..\..\..\DOCUME~1\Administrator\MYDOCU~1\avr\3.C
!W C:\DOCUME~1\Administrator\MYDOCU~1\avr\3.C(3):[warning] old-style function definition for `main'
iccavr -o 2 -LC:\iccv7avr\lib\ -g -e:0x4000 -ucrtatmega.o -bfunc_lit:0x54.0x4000 -dram_end:0x45f -bdata:0x60.0x45f -dhwstk_size:30 -beeprom:0.512 -fihx_coff -S2 @2.lk -lcatmega
!E 3.o(14): multiple define: '_main'
!E 4.o(37): multiple define: '_main'
C:\iccv7avr\bin\imakew.exe: Error code 1
Done: there are error(s). Exit code: 1. Fri Mar 09 11:14:31 2012 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询