找回密码
 注册
快捷导航
查看: 10511|回复: 2

请教,ubantu如何安装c compiler?

[复制链接] |自动提醒
阅读字号:

65

回帖

0

积分

84

资产值

入门会员 Rank: 1

注册时间
2006-2-21
发表于 2007-11-9 11:33:52| 字数 1,221| - 中国–辽宁–沈阳 电信/沈阳广电电信合作宽带 | 显示全部楼层 |阅读模式
现在装了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好用?
谢谢!!

240

回帖

7

积分

1944

资产值

高级会员 Rank: 2Rank: 2

注册时间
2003-5-31
铜牌荣誉勋章(注册8年以上会员)银牌荣誉勋章(注册10年以上会员)
发表于 2007-11-9 14:58:33| 字数 56| - 中国–山东–济南 联通 | 显示全部楼层
用那个软件管理器,然后把所有关于gcc的全部选上

Ps: Ubuntu 就挺好,对于linux来讲,版本并不是主要问题
tp600x piii500/576M/40G/24xcd  偶尔开机
t42p  玩具
t60p-2700ad1 修好了
回复 支持 反对

使用道具 举报

65

回帖

0

积分

84

资产值

入门会员 Rank: 1

注册时间
2006-2-21
 楼主| 发表于 2007-11-14 22:48:28| 字数 28| - 中国–辽宁–沈阳 电信/沈阳广电电信合作宽带 | 显示全部楼层
谢谢!已搞定!
sudo apt-get install g++
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

Powered by Discuz! X3.5 © 2001-2023 Comsenz Inc

GMT+8, 2025-2-11 16:52 , Processed in 0.095776 second(s), 28 queries , Gzip On, OPcache On.

手机版|小黑屋|安卓客户端|iOS客户端|Archiver|备用网址1|备用网址2|在线留言|专门网

返回顶部