i began to learn c program language last night. but when i tried this morning,a problem happened.
i wrote :
#include <stdio.h>
main()
{
printf("hello, world\n");
}
then i saved as "helloworld.c". and in terminal "cc helloworld.c"
but it appeared :
helloworld.c:1:19: error: stdio.h: No such file or directory
helloworld.c: In function ‘main’:
helloworld.c:4: warning: incompatible implicit declaration of built-in function ‘printf’
what is the problem?
[Done]plz help me with a simple gcc problem
版面规则
我们都知道新人的确很菜,也喜欢抱怨,并且带有浓厚的Windows习惯,但既然在这里询问,我们就应该有责任帮助他们解决问题,而不是直接泼冷水、简单的否定或发表对解决问题没有任何帮助的帖子。乐于分享,以人为本,这正是Ubuntu的精神所在。
我们都知道新人的确很菜,也喜欢抱怨,并且带有浓厚的Windows习惯,但既然在这里询问,我们就应该有责任帮助他们解决问题,而不是直接泼冷水、简单的否定或发表对解决问题没有任何帮助的帖子。乐于分享,以人为本,这正是Ubuntu的精神所在。
- ljimmyd
- 帖子: 84
- 注册时间: 2007-04-27 9:16
[Done]plz help me with a simple gcc problem
上次由 ljimmyd 在 2008-08-16 8:31,总共编辑 1 次。
- CLOCKWORKHEART
- 帖子: 635
- 注册时间: 2007-11-05 19:26
- hellojinjie
- 帖子: 1150
- 注册时间: 2007-09-14 21:03
- 来自: 浙江