PDA

View Full Version : GCC question


ClemsonSenior
03-12-02, 08:46 PM
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.

ClemsonSenior
03-12-02, 10:09 PM
Ok guys, figured it out myself.....gotta say ./hello instead of just hello....last time I used command prompt was the DOS days so...