LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 3595|回复: 10

怎么运行C语言程序啊

[复制链接]
发表于 2003-5-30 10:22:29 | 显示全部楼层 |阅读模式
大家能帮我啊
发表于 2003-5-30 10:25:54 | 显示全部楼层
转入程序版,在程序版的置顶的帖子中有。去找找看。
 楼主| 发表于 2003-5-30 10:27:18 | 显示全部楼层
怎么转入程序版,我是菜鸟啊
能说详细一点吗?
谢谢各位啊
发表于 2003-5-30 10:37:54 | 显示全部楼层
就是我来转,兄弟可以直接去程序版看相应的帖子,或者在这个帖子后面跟帖,不要忘记找自己的帖子。
发表于 2003-5-30 11:08:20 | 显示全部楼层
#gcc -o yourfile.c yourfile
#./yourfile
发表于 2003-5-30 11:09:47 | 显示全部楼层
北南兄不容易呀...
发表于 2003-5-30 11:15:38 | 显示全部楼层
^ ^
发表于 2003-5-30 12:16:07 | 显示全部楼层
记得运行时要用 ./youfile
发表于 2003-6-1 00:36:57 | 显示全部楼层
FT
发表于 2003-6-1 15:56:56 | 显示全部楼层

我还是不懂

man:/gcc太长了,没有办法看下去
我自己做了一个程序:
/*************test.c****************/
#include "stdio.h"
main()
{
printf("hello,world!");
}
/*****************end***********/
在终端下运行:
gcc test.c -o test.out
然后发现生成了一个test.out
运行
./test.out
什么反应也没有,直接返回了


终端如下:
[weiwei@localhost weiwei]$ gcc test.c -o test.out
[weiwei@localhost weiwei]$ ls
??/                    pic/                             tmp/
2001121922.swf         pro/                             unnamed.pro
[BEYOND]-AMANI.dat     Real/                            win/
[BEYOND]-光辉岁月.dat  RealPlayer9/                     孙燕子.avi
cc/                    [S.H.E-]恋人未满(强力推荐).mpg  [戴佩妮]你要的爱-.mpg
Desktop/               snapshot1.png                    方世玉A.rm
Documents/             test/                            方世玉B.rm
evolution/             test1.c                          [李小东]冬季的校园.avi
form1.ui               test2/                           [梁咏琪]短发.mpg
form1.ui~              test3/                           [梁咏琪]胆小鬼.mpg
Mail/                  test4/                           [许美静]阳光总在风雨后.dat
Mandrake/              test5/                           [陈琳] - 爱就爱了.DAT
mnt/                   test.c                           [黑豹]无地自容.dat
mydata/                test.out*
[weiwei@localhost weiwei]$ ./test.out
[weiwei@localhost weiwei]$
请问为什么没有打印hello,World这一句?
或则是如何查看程序结果?
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表