LinuxSir.cn,穿越时空的Linuxsir!

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

gcc没有办法编译HelloWorld

[复制链接]
发表于 2006-5-30 23:42:44 | 显示全部楼层 |阅读模式
debian:~# echo "main(){printf(\"hello world\n\");}" >hello.c
debian:~# gcc hello.c
/usr/bin/ld: crt1.o: No such file: No such file or directory
collect2: ld returned 1 exit status
debian:~# ./a.out

我查看了一下,的确没有/usr/bin/ld: crt1.o这个文件,但是为什么会没有呢?我使用的是debian sarge
发表于 2006-5-31 01:20:07 | 显示全部楼层
未装 libc6-dev ?
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-5-31 08:55:45 | 显示全部楼层
debian的话,是不是使用apt-get install libc6-dev就可以了?
回复 支持 反对

使用道具 举报

发表于 2006-5-31 09:15:46 | 显示全部楼层
Yes, it is.
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

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