1. First : You need to create the object files , let's say we are using pic 18f mcu
$sdcc -V --vc --debug -mpic16 -p18f4550  --use-non-free -I/.  -L/.  -c  delay.c
$sdcc -V --vc --debug -mpic16 -p18f4550  --use-non-free -I/.  -L/.  -c  default.c
It's create delay.o and default.o

gplib -c libmylib delay.o default.o #It creates libmylib
To use lib my lib in compile main.c you put in main.c 
#include "dealy.c"
Now to use the library
$sdcc -V --vc --debug -mpic16 -p18f4550  --use-non-free -I/.  -L/. libmaylib main.c -o main.hex
Creates main.hex

On Fri, Dec 21, 2012 at 11:46 AM, feqin fan <feqin1023@gmail.com> wrote:
just like the title,how to create a .lib library file like the libsdcc.lib? did not using ar or sdcclib.

My machine is using the Windows XP.
in the manual said "see the documentation for the assembler and linkage
editor (which are in <installdir>/share/sdcc/doc) for how to create a .lib library file."
but I cannot find this materials.

Thanks, Guys..

live long and prosper..

LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
Sdcc-user mailing list