linux下 C编程
-
- 帖子: 17
- 注册时间: 2007-12-28 18:46
linux下 C编程
#include <stdio.h>
int main()
{
printf("hello c");
return 0;
}
gcc -g -o hello hello.c
出现错误提示
tomy@tomy-desktop:~$ gcc -g -o hello hello.c
hello.c:1:18: error: stdio.h: No such file or directory
hello.c: In function ‘main’:
hello.c:5: warning: incompatible implicit declaration of built-in function ‘printf’
以前没在LINUX下进行C编程 这个在WINDOWS 用 GCC 能够编译通过 但在LINUX下面却提示找不到头文件呢? 请问是为什么,如何解决?
GCC 已经安装上了
sudo apt-get install build-essential
是否还需要做其他的设置?
int main()
{
printf("hello c");
return 0;
}
gcc -g -o hello hello.c
出现错误提示
tomy@tomy-desktop:~$ gcc -g -o hello hello.c
hello.c:1:18: error: stdio.h: No such file or directory
hello.c: In function ‘main’:
hello.c:5: warning: incompatible implicit declaration of built-in function ‘printf’
以前没在LINUX下进行C编程 这个在WINDOWS 用 GCC 能够编译通过 但在LINUX下面却提示找不到头文件呢? 请问是为什么,如何解决?
GCC 已经安装上了
sudo apt-get install build-essential
是否还需要做其他的设置?
- bones7456
- 帖子: 8495
- 注册时间: 2006-04-12 20:05
- 来自: 杭州
- 联系:
- hualang0929
- 帖子: 1226
- 注册时间: 2006-11-11 10:23
- 来自: Mars
- 联系:
-
- 帖子: 17
- 注册时间: 2007-12-28 18:46
-
- 帖子: 17
- 注册时间: 2007-12-28 18:46
- bones7456
- 帖子: 8495
- 注册时间: 2006-04-12 20:05
- 来自: 杭州
- 联系:
-
- 帖子: 17
- 注册时间: 2007-12-28 18:46
-
- 帖子: 17
- 注册时间: 2007-12-28 18:46
-
- 帖子: 17
- 注册时间: 2007-12-28 18:46
- tipfoo
- 帖子: 303
- 注册时间: 2007-07-12 16:30
- 来自: 桂林
-
- 帖子: 17
- 注册时间: 2007-12-28 18:46