Newsgroups: comp.os.msdos.djgpp From: manfred DOT heumann AT uni-bielefeld DOT de (Manni Heumann) Subject: Re: hello.cpp: No such file or directory References: X-Newsreader: News Xpress 2.01 Date: Tue, 28 Sep 1999 10:50:20 GMT NNTP-Posting-Host: dhcp33-114.uni-bielefeld.de Message-ID: <37f09d7a.0@news.uni-bielefeld.de> X-Trace: 28 Sep 1999 12:50:34 +0200, dhcp33-114.uni-bielefeld.de Lines: 43 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com In article , Rodeo Red wrote: >I've found the iostream.h I was missiong last night, (somehow half of a >zip file got unzipped. I found out which one by looking at the files in >the zip files in winzip, which I didn't know it could do. ) Now I've >got an entirely new error message and a few questions about the >following. > >C:\WINDOWS\Desktop>gcc hello.cpp -o hello.exe -lm >gcc.exe: hello.cpp: No such file or directory (ENOENT) > >The file does exist. However- > >#1)Does it matter which prompt I'm using ? >C:\WINDOWS and C:\ seem to get the same results , but its a variable >that makes me wonder if it matters. Even if this is not my problem now, >I'd like to know if it could be in the future. Use the "prompt" that matches the path your program code is stored in (on?). Or, to put in in pro-terms, make the directory, that hello.cpp is stored in, your current directory. >#2)Also does it matter which directory should I save hello.cpp to ? >I've put it in several different directories and none of them seem to >work. How does the program know where ot look ? If the same file is in >several different directories how does the program know which one to use >? Again, even if this is not my problem now, I'd like to know if it >could be in the future. > You can put in any directory you like. The compiler won't mind. You should, however. Create a directory where you keep your sources and projects. Make a new subdirectory for every new program. This way YOU will find your code. >#3) Why else would I get this message ? I've tried different prompts and >saving the file to different directories so I don't think that's the >problem. So I'm stumpted as to why the file isn't being found. > > Did you ever try a "prompt" that matched the directory? -- Manni