LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   C programming error (https://www.linuxquestions.org/questions/linux-newbie-8/c-programming-error-320813/)

recaicircir 05-06-2005 02:29 PM

C programming error
 
Hello there,

I am new to Linux and I have Fedora Core 3 installed on my computer.
After I compile a C file with gcc or cc I cannot execute the compiled program and get an error message saying

$ gcc prog1.c
$ a.out
bash : a.out is not a command

What should I do to run my compiled files?

Thanks

Mara 05-06-2005 05:23 PM

Moved: This thread is more suitable in a more technical forum like Linux-Newbie and has been moved accordingly to help your thread/question get the exposure it deserves.

Run
./a.out
To run it simply with a.out you need to have the directory you have the file in $PATH environmental variable.

recaicircir 05-08-2005 03:02 PM

Thanks.


All times are GMT -5. The time now is 04:16 PM.