Re: GCC not working


Subject: Re: GCC not working
From: Sy Bensky (subensky@yahoo.com)
Date: Mon Nov 13 2000 - 12:32:35 MST


You also have to change the mode of the file.

chmod +x hello

Sy Bensky

--- Black <cpa@ece.cmu.edu> wrote:
> Under Linux (unix, etc...) in order to be able to
> run an executable, the
> system has to be able to know where it is. So, if
> you just compiled and
> got an object file called hello, the system doesn't
> know that it is
> something that you might actually want to run. So,
> to run it you have two
> options. You can call hello using and give it a path
> so that the kernel
> knows where to find the program. If hello is in the
> same directory as you
> are, you can just type ./hello and it should run.
> The '.' resolves to the
> current directory. If it is a program you have
> written that you want to
> run anywhere, you can set your PATH variable so that
> it points to the
> directory that contains the program you wish to run.
> You can see where
> your PATH points to now by typing >echo $PATH. There
> are various ways to
> append new directories to your PATH depending on the
> shell you are
> running. I don't remember what it is under bash, but
> under tcsh it is just
> setenv PATH <new directory>:$PATH
>
> I hope that helps.
>
> -Christopher
>
> On Fri, 10 Nov 2000, Leslie Everett wrote:
>
> >
> > On my iMac under YDL I used GCC to create the
> simple "Hello World!"
> > program in C programming language. When I try to
> run the program by
> > typing "hello", I get this error message:
> >
> > bash: hello: command not found
> >
> > I've exhausted my limited knowledge of Linux. Any
> suggestions on how to
> > solve this problem? Thanks in advance.
> >
> > - Leslie Everett
> >
>

__________________________________________________
Do You Yahoo!?
Yahoo! Calendar - Get organized for the holidays!
http://calendar.yahoo.com/



This archive was generated by hypermail 2a24 : Mon Nov 13 2000 - 12:33:47 MST