delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/09/28/08:27:06

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: <D9BC7976AAE40D84 DOT C5602DF8447E0627 DOT 2CF1545D121CCB15 AT lp DOT airnews DOT net>
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 <D9BC7976AAE40D84 DOT C5602DF8447E0627 DOT 2CF1545D121CCB15 AT lp DOT airnews DOT net>, Rodeo Red <rodeored AT netstep DOT net> 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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019