Date: Sun, 28 Jan 1996 14:18:56 +0200 (IST) From: Eli Zaretskii To: Boris Lchang Cc: djgpp AT delorie DOT com Subject: Re: Error: c:/djgpp/bin/ld.exe: cannot open crt0.o: file not found On 26 Jan 1996, Boris Lchang wrote: > The compilation error message is > > c:/djgpp/bin/ld.exe: cannot open crt0.o > > I checked that crt0.o is in c:/djgpp/lib directory. > Why can't ld.exe find this crt0.o file? Your environment should have a variable named DJGPP which should point to the exact pathname of the file DJGPP.ENV on your machine. If you don't have that variable defined, type this from the DOS command line (or add it to your AUTOEXEC.BAT and reboot): set DJGPP=c:/djgpp/djgpp.env (but change that to the actual path of djgpp.env on your system). That file defines a variable `LIBRARY_PATH' in the [gcc] section which tells gcc to instruct the linker to search your lib/ subdirectory. To verify that the linker indeed searches that directory, add -v to your link command line. Gcc will then print the way it invokes the linker (`ld'): you should see a -L switch there which includes your lib/ subdirectory.