解决简单问题 c
发表于 : 2007-12-20 23:04
我在VIM里输入如下代码:
#include <stdio.h>
void main(){
printf( "hello world!\n" );
}
然后编译,输入:gcc -c test.c
然后出现下列信息:
test.c:1:18: 错误: stdio.h:No such file or directory
test.c: 在函数 ‘main’ 中:
test.c:2: 警告: ‘main’ 的返回类型不是 ‘int’
是不知道是为什么?本人刚接触linux下的编程,跪求高人指导。
#include <stdio.h>
void main(){
printf( "hello world!\n" );
}
然后编译,输入:gcc -c test.c
然后出现下列信息:
test.c:1:18: 错误: stdio.h:No such file or directory
test.c: 在函数 ‘main’ 中:
test.c:2: 警告: ‘main’ 的返回类型不是 ‘int’
是不知道是为什么?本人刚接触linux下的编程,跪求高人指导。