Thanks Olin for taking the time to fix the bugs. Now it works. I have successfully built the host program (pic_read.exe and pic_prog.exe). Just follow the following steps to build the host program. I have not gone into too much details for the file dependencies. I will guess that most of the pascal files (the obj files are listed in picprg.mlist) are only used to build picprg.lib ( I do not know how to build it yet). You only need the pic_read.pas and pic_prog.pas right now. Now only the instructions to build the libraries are missing (related to C:\embedinc\lib\defaults.make). 1) Make sure you have Visual C++ 6 and the Embedinc program installed (latest version from Embedinc website) 2) Set the environment variables according to the document C:\embedinc\doc\envvars.txt. LIB_SYS= MSVCDIR= 3) Copy the necessary files from c:\embedinc\source\picprg to c:\embedinc\src\picprg. 4) build the two host software cd c:\embedinc\src\picprog build_pas pic_read build_pas pic_prog Regards, Xiaofan -----Original Message----- From: olin_piclist@embedinc.com [mailto:olin_piclist@embedinc.com] Sent: Friday, June 17, 2005 7:55 PM To: Microcontroller discussion list - Public. Subject: Re: [PIC] Makefile for EasyISP Chen Xiao Fan wrote: > Now the first part works quite well ( sst %1.pas -out %1 -local_ins > which translate the pascal source to c file). Thanks. I will try the > next part ("%MSVCDir%\bin\cl" %1%.c /c /nologo /Gz /G6 /Ox which > compile the c file) later since I do not have Visual C++ 6 right now. > The last part (linking, "%MSVCDir%\bin\link" @%lnk) seems quite complex. Yes, the script that runs the linker has some complexity. Fortunately you are very unlikely to need to mess with it. I just checked, and my version of BUILD_PROG.BAT is over 2 years old. -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist