Click to See Complete Forum and Search --> : C compiler in Linux


Prishtina
09-21-2001, 01:55 PM
Hi ,,
I'm trying to compile a simple hello world C file with gcc and run it.. When i try to run a.out it says bash: a.out: command not found even though a.out is there...

Strike
09-21-2001, 02:11 PM
Try ./a.out

scanez
09-21-2001, 10:05 PM
The current directory (.) is not usually in your path be default so you have to say where a.out is to be found.

SC

X_console
09-21-2001, 10:11 PM
If you want to add the current directory to your PATH, you can do a echo "export PATH=$PATH:." >> ~/.bash_profile and then type source ~/.bash_profile