Re: gcc on Linux 8.0 not working



On Mon, 18 Jun 2007 09:36:26 -0700, Tom Gear wrote:

I just purchased Red Hat Linux 8 Bible by Chris Negus, used. I loaded
Linux 8.0 with the purpose of learning C via Kernigan and Ritchie,
Linux, and Nasm. I didn't install any GUI, I'm going to work in the
shell.

I installed "developer tools" , and wrote the Hello World program
verbatim from K&R in my home directory. When I type "gcc hello.c", no
error messages appear, and a.out appears in the current directory.

But, when I try to run Hello, world by typing "a.out", the shell
returns:

-bash no command a.out found

or something very close to that, I'm not sitting at that computer right
now.
I tried changing the name of a.out, and it still doesn't work.

Tom Gear

Do you have your local directory (.) in your search path? Also what are
the permissions on a.out? Do a chmod +x a.out and see if that fixes your
problem.
.


Quantcast