当前位置: 技术问答>linux和unix
how to run a.out
来源: 互联网 发布时间:2015-03-01
本文导语: I compile the c program in linux red hat 7.3 cc hello.c and the result is a.out I try to run it by typing 'a.out' but error: bash: a.out: command not found I have already changed my shell to c shell by using chsh (why it is still u...
I compile the c program in linux red hat 7.3
cc hello.c
and the result is a.out
I try to run it by typing 'a.out'
but error:
bash: a.out: command not found
I have already changed my shell to c shell by using chsh (why it is still using bash shell ?)
cc hello.c
and the result is a.out
I try to run it by typing 'a.out'
but error:
bash: a.out: command not found
I have already changed my shell to c shell by using chsh (why it is still using bash shell ?)
|
#a.out , shell will think it is a command and try to find it under system path
so you have to type #./a.out, means excute a file in current directory
so you have to type #./a.out, means excute a file in current directory
|
./a.out
|
shell>./a.out