We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
I am using the C51FPL.LIB when compiling my project for a LPC936. I've been using it for months - works fine.
I put a 'sprintf' in my code and included 'stdio.h'. I now get the linker error (BL51) of 'Error L103: External Attibute Does Not Match Public". Anyone know what the problem is? Am I using the wrong library file to use sprintf? I am using 'strcpy' and included 'stdio.h' and no problems. I was trying to find a listing of what the different LIBs are, but haven't found one. I know FPL is floating point large. If I comment out the sprintf, code compiles fine like normal. This is a sample of code that gives the linker error. Something simple, I'm sure.
unsigned char x, text[20];
x = 12; sprintf(text,"%d Volts", x);
Thanks.
Sutton
Every "extern" Declaration must have exactly one matching Public Definition.
The Linker is telling you that they don't match - the names are the same, but some other Attribute(s) differ(s)
"Attributes" could be size, memory model, signed-ness, etc, etc...
Look very carefully, and Spot The Difference...
I'm not using any externs with this example. All local variables. So, the problem must be with the sprintf declaration itself, which is in the Keil header file, "stdio.h". Which LIBs does sprintf appear in?