红联Linux门户
Linux帮助

新手新问:VM中安装RedHat9.0,编译C程序无法运行?

发布时间:2010-06-16 18:35:53来源:红联作者:dw2835
在XP系统中安装virtual machine, 之后安装Red Hat9.0, 三张光盘镜像安装,全部组件安装。启动Linux后貌似一切正常,但是想试一下C程序编译,编译后程序无法运行,请问错在哪里了?新手多问蠢问题,污了各位的眼勿怪!多谢!!


[root@EmbedSky root]# cd /
[root@EmbedSky /]# cd home/wei/myTest
[root@EmbedSky myTest]# ls
hello.c
[root@EmbedSky myTest]# cat hello.c
#include
int main()
{
printf("Hello Linux!\n");
return 0;
}
[root@EmbedSky myTest]# gcc -o hello hello.c
[root@EmbedSky myTest]# ls
hello hello.c
[root@EmbedSky myTest]# hello
bash: hello: command not found
[root@EmbedSky myTest]#
文章评论

共有 5 条评论

  1. luck_yao 于 2010-10-11 17:58:10发表:

    也就一个绝对路径和相对路径的问题!

  2. 王文果 于 2010-09-28 17:49:52发表:

    看看啊

  3. hyl01537 于 2010-08-31 19:19:52发表:

    编程是这样子的!

  4. dw2835 于 2010-06-16 23:50:04发表:

    果然愚蠢,多谢圣光!!

  5. 绿色圣光 于 2010-06-16 21:33:19发表:

    ./hello