From: Lou <co...@fi...> - 2002-07-06 23:44:40
|
On Sat, Jul 06, 2002 at 05:51:46AM -0700, anand bhanushali wrote: > Hello, > I am a new user of sdcc,i have written a simple > application for AT89c51 It's not able to link the > liabrary files.the error i am getting is ? > ASlink -warning-undefined global '_delay_ms' > referenced by module 'program name'. I am attaching > the code > #include "delay_ms.h" [...] Where are you defining delay_ms? From your include, it appears to be of your own devising (as opposed to a system library). I quick look at the system libraries shows no delay routines. If it is in an object (.rel), you do have to put that on the command line when linking. If you have built a library of your own, you have to specify it with the -L and -l options. You also have to have built the library correctly, of course. A library is just a directory of .rel files with a text file (name ending in .lib (eg: delay.lib)) containing their base names (without the .rel, one per line). Sorry if you knew that, but I had to figure it out myself. Actually, all of the .rel files and text files can be in one directory; I call mine "lib". Look at /usr/share/sdcc/lib/small for an example. |