[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]

Re: c programming in Linux



Hi,

The one and only reason for this is your $PATH is not having current
directory.
So, you can do two things
1) execute with ./a.out  (For executing any commands in current dir
   you need to give ./ before)
2) Other thing is append "." to your PATH variable which is very much
   preferred, since mostly we will access files from current directory
   and it will be head-ache :) to use ./ every time.
   Keep export PATH=$PATH:. statement in your profile and login
   You can execute this command at prompt also for the current shell.

Prem.,



On Tue, 22 Jun 1999, Kunal Shah wrote:

> Hi all
> I have a book of stephen prata which is  advanced unix - a programmers guide.
> I am trying to learn c from it.
> When i write  a simple program "to print hello world" and issue a command 
> cc kunal.c no error is shown by systems and next command prompt appears.
> But when i try to run this program by issuing command a.out nothing is happening and system prompts bash : a.aout not found not such file or directory
>  like it is not recognizing that command.
> is there any other  metode to run c programs?
> Kunal
> 

- --------------------------------------------------------------------
For more information on Linux in India visit http://www.linux-india.org/
Linux India is NOT a forum for Microsoft/India/Pakistan/US/UK bashing.
Flame baits will not be tolerated.  If you can appreciate satire read
http://www.templetons.com/brad/emily.html

------------------------------