Boston Linux & Unix (BLU) Home | Calendar | Mail Lists | List Archives | Desktop SIG | Hardware Hacking SIG
Wiki | Flickr | PicasaWeb | Video | Maps & Directions | Installfests | Keysignings
Linux Cafe | Meeting Notes | Blog | Linux Links | Bling | About BLU

BLU Discuss list archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

hello world question



Because your $PATH does not include the directory you are currently in,
you need to specify the path to the file. 

Try: ./a.out

Which refers to the a.out in the current directory.

--
/"\	Ben Jackson
\ /     bejackso at lynx.neu.edu - http://www.shore.net/~bbj
 X      Member of the ASCII Ribbon Campaign Against HTML Mail
/ \



On Sun, 2 Jun 2002, Kalyan Vaidyanathan wrote:

> Hi,
>   Have a very basic question in C.
> * I have installed RH 7.2.
> * I created a file called hello.c which looks like this:
>     #include<stdio.h>
>     main() { printf("Hello World\n"); }
> * To compile and run it, on a terminal window, I typed the following:
>     >gcc hello.c
> * I get no errors and a.out is created
> * I try to run a.out and I get the following error
>    >a.out
>    bash: a.out: command not found
> 
> I am not sure if I have some env setting that is wrong.  Can somebody point 
> me to the right direction?
> thx and regards,
> -k
> 
> 
> 
> 
> _________________________________________________________________
> Send and receive Hotmail on your mobile device: http://mobile.msn.com
> 
> _______________________________________________
> Discuss mailing list
> Discuss at blu.org
> http://www.blu.org/mailman/listinfo/discuss
> 





BLU is a member of BostonUserGroups
BLU is a member of BostonUserGroups
We also thank MIT for the use of their facilities.

Valid HTML 4.01! Valid CSS!



Boston Linux & Unix / webmaster@blu.org