Simple but sweet. a.out is not my friend

Simple but sweet. a.out is not my friend

Post by josh richar » Wed, 10 Feb 1999 04:00:00



I have compiled a c program using the gcc compiler in red hat 5.2.  After
the compilation is complete, I have an executable created called a.out.  I
type a.out to run the program and get the following error
"bash - command a.out not found"

Any ideas why?

Thank you
-j

 
 
 

Simple but sweet. a.out is not my friend

Post by Tommy Willoughb » Thu, 11 Feb 1999 04:00:00



> I have compiled a c program using the gcc compiler in red hat 5.2.  After
> the compilation is complete, I have an executable created called a.out.  I
> type a.out to run the program and get the following error
> "bash - command a.out not found"

Do you type:    a.out     or:     ./a.out?

 
 
 

Simple but sweet. a.out is not my friend

Post by Ville Voutilain » Thu, 11 Feb 1999 04:00:00



>I have compiled a c program using the gcc compiler in red hat 5.2.  After
>the compilation is complete, I have an executable created called a.out.  I
>type a.out to run the program and get the following error
>"bash - command a.out not found"
>Any ideas why?

One of the most frequently asked questions ever. The file is not
in your path, if you want to launch it from your current working
directory, type ./a.out
and you should be all set.

-VJV-

 
 
 

Simple but sweet. a.out is not my friend

Post by Mirce » Thu, 11 Feb 1999 04:00:00


The current directory (.) is not in your path string by
default. Use ./a.out instead.

MST


> I have compiled a c program using the gcc compiler in red hat 5.2.  After
> the compilation is complete, I have an executable created called a.out.  I
> type a.out to run the program and get the following error
> "bash - command a.out not found"

> Any ideas why?

> Thank you
> -j

 
 
 

Simple but sweet. a.out is not my friend

Post by Ed Finc » Thu, 11 Feb 1999 04:00:00



> I have compiled a c program using the gcc compiler in red hat 5.2.  After
> the compilation is complete, I have an executable created called a.out.  I
> type a.out to run the program and get the following error
> "bash - command a.out not found"

You don't have the current-working-directory (".") in your PATH
environment variable. It's ok to add it - but don't add . to
root's path for security reasons.

Regards,
Ed
--
   Q: Why do PCs have a reset button on the front?
   A: Because they are expected to run Microsoft operating systems.