Date: Tue, 17 Oct 1995 09:41:38 +0200 (IST) From: Eli Zaretskii To: "Corby S. Hudnall" Cc: djgpp AT sun DOT soe DOT clarkson DOT edu Subject: Re: Frustration!!! On 15 Oct 1995, Corby S. Hudnall wrote: > 3) While trying to compile a Hello World C++ program like this: > gcc test.cpp -I\djgpp\cplusinc -I\djgpp\include > I get this: c:/djgpp/bin/ld.exe: cannot open crt0.o: file not found > Why isn't this file found/created while compiling? How can I get this > simple 5 line code to compile? All of your problems seem to be caused by a single cause: Gcc cannot find the directories for include files and libraries (crt0.o is in the same directory where the library resides). Check once again the setting of DJGPP environment variable, which should point to the main DJGPP installation directory: set DJGPP=c:/djgpp/djgpp.env Check that you indeed have the file djgpp.env, and that it includes the necessary settings for C_INCLUDE_PATH, CPLUS_INCLUDE_PATH and LIBRARY_PATH variables. If this doesn't help, you can set these variables from the DOS command line (or from autoexec.bat) and see if that does the trick. To check whether Gcc sees these variables, add -v switch to gcc command line and see whether Gcc includes the correct directories in its report on search paths for include files and libraries. PS. It's safer to use forward slashes in all DJGPP-related settings, although AFAIK DJGPP should recognize both.