• Welcome to Overclockers Forums! Join us to reply in threads, receive reduced ads, and to customize your site experience!

GCC question

Overclockers is supported by our readers. When you click a link to make a purchase, we may earn a commission. Learn More.

ClemsonSenior

Registered
Joined
Mar 3, 2002
Location
Clemson, SC
Maybe this belongs in the Linux forum, I'm not sure but......

I have Redhat 7.2 and am a total Linux newbie, but I have done a little bit w/ Unix. I wanted to test the gcc compiler. I made a basic little C program and compiled it w/ the command:
gcc hello.c -o hello
I've also tried other compile statements found on gcc tutorial pages. With all of them, I get no compiler errors, and it makes a "hello" file that shows up as an executable (green w/ ls). However, whenever I run it, it says something like "bash: command "hello" not found" or something like that. I then installed the new GCC 3.0.4, and get the same problem. Anyone know what I'm doing wrong? Its got to be something stupid. Thanks in advance.
 
OP
C

ClemsonSenior

Registered
Joined
Mar 3, 2002
Location
Clemson, SC
Ok guys, figured it out myself.....gotta say ./hello instead of just hello....last time I used command prompt was the DOS days so...