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

simple printf causes L103 linker error

I haven't received an answer that fixed my problem, so here is another example.

I have a simple printf statement that causes a L103 error. No variables declared. Includes "stdio.h" and links in C51FPL.LIB. Others LIBs don't seem to link correctly either. Code compiles fine. Anyone know what the linking problem could be?

#include "stdio.h"

main()
{ printf("12345");
}

BL51 BANKED LINKER/LOCATER V5.12
COPYRIGHT KEIL ELEKTRONIK GmbH 1987 - 2004

*** ERROR L103: EXTERNAL ATTRIBUT DO NOT MATCH PUBLIC SYMBOL: ?_PRINTF?BYTE MODULE: C51FPL.LIB (PRINTF)

Program Size: data=15.1 xdata=48 code=2562
LINK/LOCATE RUN COMPLETE. 0 WARNING(S), 1 ERROR(S)

Parents
  • Sutton;
    While I was typing my second post you answered my first post so we are out about 90deg at present.
    Let's review quickly.
    Set the Memory Model to Small.
    Set the Code ROM Size to Large.
    Review the Extension folder tabs for correct settings.
    What device type are you using?
    What On-Chip and/or Off Chip RAM and ROM setting do you have set-up?
    I will attempt to duplicate you problem.
    Bradford

Reply
  • Sutton;
    While I was typing my second post you answered my first post so we are out about 90deg at present.
    Let's review quickly.
    Set the Memory Model to Small.
    Set the Code ROM Size to Large.
    Review the Extension folder tabs for correct settings.
    What device type are you using?
    What On-Chip and/or Off Chip RAM and ROM setting do you have set-up?
    I will attempt to duplicate you problem.
    Bradford

Children
No data