[问题]请教,ubantu如何安装c compiler?
版面规则
我们都知道新人的确很菜,也喜欢抱怨,并且带有浓厚的Windows习惯,但既然在这里询问,我们就应该有责任帮助他们解决问题,而不是直接泼冷水、简单的否定或发表对解决问题没有任何帮助的帖子。乐于分享,以人为本,这正是Ubuntu的精神所在。
我们都知道新人的确很菜,也喜欢抱怨,并且带有浓厚的Windows习惯,但既然在这里询问,我们就应该有责任帮助他们解决问题,而不是直接泼冷水、简单的否定或发表对解决问题没有任何帮助的帖子。乐于分享,以人为本,这正是Ubuntu的精神所在。
-
- 帖子: 7
- 注册时间: 2007-11-09 10:20
[问题]请教,ubantu如何安装c compiler?
现在装的是ubuntu7.10,
从一个老外那要来的软件,make时报错,
cc -O2 -c -o swat.o swat.c
> In file included from swat.c:25:
> swat.h:25:19: error: ctype.h: No such file or directory
> swat.h:26:18: error: math.h: No such file or directory
> swat.h:27:19: error: stdio.h: No such file or directory
> In file included from swat.c:25:
> swat.h:87: error: expected specifier-qualifier-list before ‘FILE’
> swat.c: In function ‘main’:
> swat.c:55: error: ‘FILE’ undeclared (first use in this function)
> swat.c:55: error: (Each undeclared identifier is reported only once
> swat.c:55: error: for each function it appears in.)
> swat.c:55: error: ‘fr’ undeclared (first use in this function)
> swat.c:86: warning: incompatible implicit declaration of built-in
> function ‘printf’
> swat.c:134: warning: incompatible implicit declaration of built-in
> function ‘fprintf’
> swat.c:134: error: ‘stderr’ undeclared (first use in this function)
> swat.c:142: error: ‘stdout’ undeclared (first use in this function)
> swat.c:230: warning: incompatible i
mplicit declaration of built-in
> function ‘strcpy’
> swat.c:231: warning: incompatible implicit declaration of built-in
> function ‘strcat’
> swat.c:273: warning: incompatible implicit declaration of built-in
> function ‘printf’
> make: *** [swat.o] Error 1
请教了一下老外,说是c compiler不完全
哪位兄弟有解决办法?
或者其它什么版本的linux好用?
谢谢!!
从一个老外那要来的软件,make时报错,
cc -O2 -c -o swat.o swat.c
> In file included from swat.c:25:
> swat.h:25:19: error: ctype.h: No such file or directory
> swat.h:26:18: error: math.h: No such file or directory
> swat.h:27:19: error: stdio.h: No such file or directory
> In file included from swat.c:25:
> swat.h:87: error: expected specifier-qualifier-list before ‘FILE’
> swat.c: In function ‘main’:
> swat.c:55: error: ‘FILE’ undeclared (first use in this function)
> swat.c:55: error: (Each undeclared identifier is reported only once
> swat.c:55: error: for each function it appears in.)
> swat.c:55: error: ‘fr’ undeclared (first use in this function)
> swat.c:86: warning: incompatible implicit declaration of built-in
> function ‘printf’
> swat.c:134: warning: incompatible implicit declaration of built-in
> function ‘fprintf’
> swat.c:134: error: ‘stderr’ undeclared (first use in this function)
> swat.c:142: error: ‘stdout’ undeclared (first use in this function)
> swat.c:230: warning: incompatible i
mplicit declaration of built-in
> function ‘strcpy’
> swat.c:231: warning: incompatible implicit declaration of built-in
> function ‘strcat’
> swat.c:273: warning: incompatible implicit declaration of built-in
> function ‘printf’
> make: *** [swat.o] Error 1
请教了一下老外,说是c compiler不完全
哪位兄弟有解决办法?
或者其它什么版本的linux好用?
谢谢!!
- jimhu
- 帖子: 1322
- 注册时间: 2006-01-25 22:29
- 来自: 上海
- 联系:
-
- 帖子: 7
- 注册时间: 2007-11-09 10:20
谢谢jimhu兄弟!
运行 sudo apt-get install build-essential 依然报错
继续请教,谢谢!
root@guo-laptop:~# sudo apt-get install build-essential
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
Since you only requested a single operation it is extremely likely that
the package is simply not installable and a bug report against
that package should be filed.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
build-essential: Depends: libc6-dev but it is not going to be installed or
libc-dev
Depends: g++ (>= 4:4.1.1) but it is not going to be installed
dpkg: Breaks: dpkg-dev (< 1.14.0) but 1.13.24ubuntu6 is to be installed
E: Broken packages
运行 sudo apt-get install build-essential 依然报错
继续请教,谢谢!
root@guo-laptop:~# sudo apt-get install build-essential
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
Since you only requested a single operation it is extremely likely that
the package is simply not installable and a bug report against
that package should be filed.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
build-essential: Depends: libc6-dev but it is not going to be installed or
libc-dev
Depends: g++ (>= 4:4.1.1) but it is not going to be installed
dpkg: Breaks: dpkg-dev (< 1.14.0) but 1.13.24ubuntu6 is to be installed
E: Broken packages
-
- 帖子: 3182
- 注册时间: 2006-03-10 15:10
- 来自: xi'an China
- 联系:
- BigSnake.NET
- 帖子: 12522
- 注册时间: 2006-07-02 11:16
- 来自: 廣州
- 联系:
-
- 帖子: 17
- 注册时间: 2007-11-01 23:59
- 来自: 江苏南京
- oneleaf
- 论坛管理员
- 帖子: 10441
- 注册时间: 2005-03-27 0:06
- 系统: Ubuntu 12.04
- chattan
- 帖子: 3922
- 注册时间: 2007-07-11 20:59
- 联系:
- FFFrog
- 帖子: 621
- 注册时间: 2006-05-12 23:28
- 来自: 江西乐平
- 联系: