代码: 全选
#include <stdio.h>
int main()
{
printf ("hello world.\n");
return 0;
}
出现下列提示:
到 ubuntu论坛搜索了一下,要装编程环境。build-essentialhello.c:1:19: 错误: stdio.h:没有该文件或目录
hello.c: 在函数‘main’中:
hello.c:4: 警告: 内建函数 ‘printf’ 不兼容的隐式声明
后来一想,不对,怎么默认没装上呢。于是找另外一个也是默认安装ubuntu8。04的朋友问问,他说他编译几个c的文件,不用装上。
各位是什么问题呢?大家都是默认安装,为什么我要install build-essential,他就不用呢?