Date: Tue, 28 Sep 1999 14:22:13 +0200 (IST) From: Eli Zaretskii X-Sender: eliz AT is To: Rodeo Red cc: djgpp AT delorie DOT com Subject: Re: hello.cpp: No such file or directory In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On Tue, 28 Sep 1999, Rodeo Red wrote: > C:\WINDOWS\Desktop>gcc hello.cpp -o hello.exe -lm > gcc.exe: hello.cpp: No such file or directory (ENOENT) > > The file does exist. In what directory does hello.cpp exist? The prompt above indicates that you invoked gcc in the C:\WINDOWS\Desktop directory. Does hello.cpp live in that directory? If not, you need to invoke gcc in the directory where hello.cpp lives. > #2)Also does it matter which directory should I save hello.cpp to ? It's up to you. Just invoke the compiler from the same directory where the source files are. > How does the program know where ot look ? It looks in the same directory where you invoke the compiler, and ONLY in that directory. > #3) Why else would I get this message ? Some editors attach extensions to file names: you might type "hello.cpp" when you save the file, but the editor creates e.g. "hello.cpp.txt". Use the DIR command to see what files are there.