Hi, I'm using SDCC 2.9.0 to compile a code for a PIC18F4550. I'm trying to use sprintf within my code. I have included the stdlib.h library, but on trying to compile I get the error
error: missing definition for symbol "_sprintf", required by "build/default/production/_ext/1472/main.o"
Did you compile with --use-non-free? If not, please do so.
Please provide the command line and the output of compilation with -V (or -v? The one that prints how other tools like linker and assembler are invoked).
You may need to manually link with libc18f.lib - if I am not mistaken, this should be done automatically if you let sdcc invoke the linker.
Given the ammount of newbie problems that are solved using --use-non-free, could SDCC give a warn or hint when compiling for PICs and not using --use-non-free?
That seems like good idea. I will implement such a warning this weekend.
Great! It should solve many trivial problems.
Log in to post a comment.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.