A. keil编译错误 密码锁 L104 L105 L17 L105 L118
以下是编译结果
Build target 'Target 1'
compiling 密码锁c.c...
compiling 002.c...
linking...
BL51 BANKED LINKER/LOCATER V6.22 - SN: Eval Version
COPYRIGHT KEIL ELEKTRONIK GmbH 1987 - 2009
"密码锁c.obj",
"002.obj"
TO "001"
*** ERROR L104: MULTIPLE PUBLIC DEFINITIONS
SYMBOL: FLAG
MODULE: 002.obj (002)
*** ERROR L104: MULTIPLE PUBLIC DEFINITIONS
SYMBOL: MAIN
MODULE: 002.obj (002)
*** ERROR L104: MULTIPLE PUBLIC DEFINITIONS
SYMBOL: STOP
MODULE: 002.obj (002)
*** ERROR L104: MULTIPLE PUBLIC DEFINITIONS
SYMBOL: START
MODULE: 002.obj (002)
*** ERROR L104: MULTIPLE PUBLIC DEFINITIONS
SYMBOL: DELAY
MODULE: 002.obj (002)
*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS
SEGMENT: ?PR?INIT1302?密码萨C
*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS
SEGMENT: ?PR?MAIN?002
*** ERROR L107: ADDRESS SPACE OVERFLOW
SPACE: DATA
SEGMENT: ?DT?002
LENGTH: 002CH
*** ERROR L105: PUBLIC REFERS TO IGNORED SEGMENT
SYMBOL: BUFFER
SEGMENT: ?DT?002
*** ERROR L105: PUBLIC REFERS TO IGNORED SEGMENT
SYMBOL: DSY_BUFFER1
SEGMENT: ?DT?002
*** ERROR L105: PUBLIC REFERS TO IGNORED SEGMENT
SYMBOL: USERPASSWORD
SEGMENT: ?DT?002
*** ERROR L105: PUBLIC REFERS TO IGNORED SEGMENT
SYMBOL: DSY_BUFFER
SEGMENT: ?DT?002
*** ERROR L118: REFERENCE MADE TO ERRONEOUS EXTERNAL
SYMBOL: MAIN
MODULE: D:\程序\KEIL 4\C51\LIB\C51S.LIB (?C_INIT)
ADDRESS: 13F5H
******************************************************************************
* RESTRICTED VERSION WITH 0800H BYTE CODE SIZE LIMIT; USED: 112DH BYTE (214%) *
******************************************************************************
Program Size: data=160.4 xdata=0 code=5197
LINK/LOCATE RUN COMPLETE. 2 WARNING(S), 11 ERROR(S)
*** ERROR L104: MULTIPLE PUBLIC DEFINITIONS
SYMBOL: FLAG
MODULE: 002.obj (002)
*** ERROR L104: MULTIPLE PUBLIC DEFINITIONS
SYMBOL: MAIN
MODULE: 002.obj (002)
*** ERROR L104: MULTIPLE PUBLIC DEFINITIONS
SYMBOL: STOP
MODULE: 002.obj (002)
*** ERROR L104: MULTIPLE PUBLIC DEFINITIONS
SYMBOL: START
MODULE: 002.obj (002)
*** ERROR L104: MULTIPLE PUBLIC DEFINITIONS
SYMBOL: DELAY
MODULE: 002.obj (002)
*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS
SEGMENT: ?PR?INIT1302?密码萨C
*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS
SEGMENT: ?PR?MAIN?002
*** ERROR L107: ADDRESS SPACE OVERFLOW
SPACE: DATA
SEGMENT: ?DT?002
LENGTH: 002CH
*** ERROR L105: PUBLIC REFERS TO IGNORED SEGMENT
SYMBOL: BUFFER
SEGMENT: ?DT?002
*** ERROR L105: PUBLIC REFERS TO IGNORED SEGMENT
SYMBOL: DSY_BUFFER1
SEGMENT: ?DT?002
*** ERROR L105: PUBLIC REFERS TO IGNORED SEGMENT
SYMBOL: USERPASSWORD
SEGMENT: ?DT?002
*** ERROR L105: PUBLIC REFERS TO IGNORED SEGMENT
SYMBOL: DSY_BUFFER
SEGMENT: ?DT?002
*** ERROR L118: REFERENCE MADE TO ERRONEOUS EXTERNAL
SYMBOL: MAIN
MODULE: D:\程序\KEIL 4\C51\LIB\C51S.LIB (?C_INIT)
ADDRESS: 13F5H
*** FATAL ERROR L250: CODE SIZE LIMIT IN RESTRICTED VERSION EXCEEDED
MODULE: D:\程序\KEIL 4\C51\LIB\C51S.LIB (-----)
LIMIT: 0800H BYTES
Target not created
B. 求解,keil编译无法通过,百度搜不到答案
主要是三个问题:
第一、前面两个警告是说函数定义了却没有调用, 可以不用管。
第二、Error L116的错误是说超过2K的程序都被切掉,没有编译它们了。可能原因:1、你的软件没有注册,使用的评估版,最多只能编译2K程序;2、在下图的Code Rom Size处设置限定了2K。
第三、后面的Error都是RAM空间不够,你可以优化你的程序,或者试试设置下图红线区域的Memory Model:
C. 用keil编译时出现的问题
*** WARNING L15: MULTIPLE CALL TO SEGMENT
SEGMENT: ?PR?_WRITE_COM?时钟
CALLER1: ?PR?TIMER0?时钟
CALLER2: ?C_C51STARTUP
这是说你在‘时钟’这个文本文件中多次调用了‘WRITE_COM’这个子程序,而调它的就是‘TIMER0’‘C_C51STARTUP’。
下面的几句同样是这个原因分别调用了WRITE_DATE,WRITE_SFM,WRITE_NYR,也可能是你不正确的调用了它,你注意一下就行了,你没发数据,我也只能说到这里。
*** FATAL ERROR L250: CODE SIZE LIMIT IN RESTRICTED VERSION EXCEEDED
MODULE: D:\KEIL\C51\LIB\C51S.LIB (-----)
LIMIT: 0800H BYTES
Target not created
这个就是一楼说的你的软件没有被完全破解,最好到网上去找个注册码,用那注册机太麻烦了,我也就不多说了,最后一句就是目标没有被创建!