Date: Wed, 4 Aug 93 18:07:37 -0400 From: DJ Delorie To: pak AT cs DOT ubc DOT ca Cc: djgpp AT sun DOT soe DOT clarkson DOT edu Subject: Re: can't find the library > I compiled some c codes to object files. Then I create a library > of these objects and put it in the \djgpp\lib directory. However > when I compile a new c file and try to use the new library without > giving its path, the gcc compiler complains not able to find the > library. If I type something like "gcc file.c \djgpp\lib\mylib", > the program works. Why? This is how it's supposed to work: gcc -c myfile.c ar rv libme.a myfile.o ranlib libme.a copy libme.a \djgpp\lib gcc -v prog.c -lme -o prog Is this what you're doing? Gcc sees -lXX and looks for libXX.a in $LIBRARY_PATH. DJ