在Keil C51中的Warnning L7/L16/L1/L2

最近在测试STC15的板子,用到了printf函数。这过程中犯了一个低级错误,故记录下来以免日后再犯。

出现的错误如下

Rebuild started: Project: Print
Rebuild target 'Target 1'
compiling printf.c...
linking...
*** WARNING L7: MODULE NAME NOT UNIQUE
    MODULE:  C:\KEIL5_C51\C51\LIB\C51S.LIB (PRINTF)
*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS
    SEGMENT: ?PR?_PUTCHAR?PRINTF
*** WARNING L1: UNRESOLVED EXTERNAL SYMBOL
    SYMBOL:  _PRINTF
    MODULE:  .\Objects\printf.obj (PRINTF)
*** WARNING L1: UNRESOLVED EXTERNAL SYMBOL
    SYMBOL:  ?_PRINTF?BYTE
    MODULE:  .\Objects\printf.obj (PRINTF)
*** WARNING L2: REFERENCE MADE TO UNRESOLVED EXTERNAL
    SYMBOL:  _PRINTF
    MODULE:  .\Objects\printf.obj (PRINTF)
    ADDRESS: 0016H
*** WARNING L2: REFERENCE MADE TO UNRESOLVED EXTERNAL
    SYMBOL:  ?_PRINTF?BYTE
    MODULE:  .\Objects\printf.obj (PRINTF)
    ADDRESS: 0020H
*** WARNING L2: REFERENCE MADE TO UNRESOLVED EXTERNAL
    SYMBOL:  ?_PRINTF?BYTE
    MODULE:  .\Objects\printf.obj (PRINTF)
    ADDRESS: 0023H
*** WARNING L2: REFERENCE MADE TO UNRESOLVED EXTERNAL
    SYMBOL:  ?_PRINTF?BYTE
    MODULE:  .\Objects\printf.obj (PRINTF)
    ADDRESS: 0026H
*** WARNING L2: REFERENCE MADE TO UNRESOLVED EXTERNAL
    SYMBOL:  _PRINTF
    MODULE:  .\Objects\printf.obj (PRINTF)
    ADDRESS: 0028H
Program Size: data=12.0 xdata=0 code=150
".\Objects\Print" - 0 Error(s), 9 Warning(s).
Build Time Elapsed:  00:00:01

查遍C51的帮助文档也没有想出来到底是哪里冲突了...怎么就NOT UNIQUE了。

喝杯快乐肥宅水后发现,我TM把文件名命名为printf.c了......服了我自己了。改后,一切如常~

你可能感兴趣的:(单片机)