Hi, > Does not -L /usr/share/sdcc/lib/pic16 tells compiler where to get > libraries, inclusive the libc18f.lib.
Yes, but does the file exist? We recently changed the location of the installed pic14/pic16 libraries and headers due to licence issues. That's why I wrote "updated path to sdcc's pic16 libs": they moved from your path /usr/share/sdcc/lib/pic16 to /usr/share/sdcc/non-free/lib/pic16 . Please verify that /usr/share/sdcc/non-free/lib/pic16/libc18f.lib exists. > Still gives me same error. I add --use-non-free, but still the same. Do > you think something went wrong during build? I misinterpreted the error output: The failing command is not "sdcc -c main.c -o main.o" (I overlooked the -c) but the link command: >>> mkdir -p dist/default/production >>> /usr/local/bin/sdcc --debug-ralloc -Wl-c -Wl-m --pstack-model=large >>> --pno-banksel --extended --obanksel=2 -L /usr/share/sdcc/lib/pic16 -L >>> /usr/share/sdcc/lib/small -I/usr/share/sdcc/include >>> -I/usr/share/sdcc/include/pic16/ -mpic16 -p18f4550 >>> build/default/production/main.o >>> -odist/default/production/Pic18F4550Test.X.production.cof >>> make[2]: *** [dist/default/production/Pic18F4550Test.X.production.cof] >>> Error 1 >>> error: missing definition for symbol "_strcpy", required by >>> "build/default/production/main.o" The problem here is that sdcc does not compile main.c first but only invokes the linker. That way, sdcc does *not* add libc18f.lib to the list of libraries to link against (there is a #pragma libc present in all libc-headers that cause "sdcc main.c -o main.hex" to compile and automatically link against libc18f.lib; however, the #pragma is not seen when just looking at main.o ...). You need to append libc18f.lib to the linker command line. Also make sure to either include --use-non-free or the correct -L /path/to/libc18f.lib. Good luck Raphael ------------------------------------------------------------------------------ Get a FREE DOWNLOAD! and learn more about uberSVN rich system, user administration capabilities and model configuration. Take the hassle out of deploying and managing Subversion and the tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2 _______________________________________________ Sdcc-user mailing list Sdcc-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sdcc-user