public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* [noob] a.out does not execute?
@ 2005-10-06  2:12 Mark Peskir
  2005-10-06  2:23 ` Craig Jeffree
  2005-10-06  6:08 ` robin
  0 siblings, 2 replies; 3+ messages in thread
From: Mark Peskir @ 2005-10-06  2:12 UTC (permalink / raw)
  To: gcc-help

I have made some very small c programs.  They compiled with no errors under 
gcc, and produced an a.out.  However, when I type a.out to run, I get "a.out: 
command not found".  

I am running the latest gcc (4.0.2) on an x86 machine using Mandrake Linux 
10.1 (not Mandriva).  Thank you for helping this Linux beginner!

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [noob] a.out does not execute?
  2005-10-06  2:12 [noob] a.out does not execute? Mark Peskir
@ 2005-10-06  2:23 ` Craig Jeffree
  2005-10-06  6:08 ` robin
  1 sibling, 0 replies; 3+ messages in thread
From: Craig Jeffree @ 2005-10-06  2:23 UTC (permalink / raw)
  To: Mark Peskir; +Cc: gcc-help

Hi Mark,

This is most likely because you don't have your current directory in
your PATH variable.  When you execute something your shell searches
through the directories listed in your PATH variable (try "echo $PATH"
to see its contents).

In short run "./a.out" to execute a.out from the current working
directory and read about your PATH in "man bash" (bash is usually the
default shell for linux, however there are others).

Cheers,
Craig.

On Wed, 2005-10-05 at 22:12 -0400, Mark Peskir wrote:
> I have made some very small c programs.  They compiled with no errors under 
> gcc, and produced an a.out.  However, when I type a.out to run, I get "a.out: 
> command not found".  
> 
> I am running the latest gcc (4.0.2) on an x86 machine using Mandrake Linux 
> 10.1 (not Mandriva).  Thank you for helping this Linux beginner!

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [noob] a.out does not execute?
  2005-10-06  2:12 [noob] a.out does not execute? Mark Peskir
  2005-10-06  2:23 ` Craig Jeffree
@ 2005-10-06  6:08 ` robin
  1 sibling, 0 replies; 3+ messages in thread
From: robin @ 2005-10-06  6:08 UTC (permalink / raw)
  To: Mark Peskir; +Cc: gcc-help

On Wed, 2005-10-05 at 22:12 -0400, Mark Peskir wrote:
> I have made some very small c programs.  They compiled with no errors under 
> gcc, and produced an a.out.  However, when I type a.out to run, I get "a.out: 
> command not found".  
> 
> I am running the latest gcc (4.0.2) on an x86 machine using Mandrake Linux 
> 10.1 (not Mandriva).  Thank you for helping this Linux beginner!
> 

you have to indicate PATH your file resident. 
etc. you could run :
./a.out

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-10-06  6:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-10-06  2:12 [noob] a.out does not execute? Mark Peskir
2005-10-06  2:23 ` Craig Jeffree
2005-10-06  6:08 ` robin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).