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

using sprintf causes link error

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

0