LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 971|回复: 5

gcc cc 问题 求助

[复制链接]
发表于 2005-4-1 08:52:50 | 显示全部楼层 |阅读模式
我在安装一个游戏软件的时候,安装指南要求用make命令编译之后即可使用,当我运行make命令是得到错误:
    gcc -c -I/usr/include/SDL tank.c
    make: gcc: 命令未找到
    make: *** [tank.o] 错误 127
所以我又去安装gcc编译工具:当打开解压后的gcc安装文件夹后,使用./configurem命令编译。又得到如下错误:
    ./configure: cc: command not found
    *** The command'cc -o confitest -g .conftest.c' failed.
    *** You must set the environment variable CC to a working compiler.
这样我该如何解决CC命令无法运行问题,是不是要安装CC还是系统里面有那个,只是我没开启??
 楼主| 发表于 2005-4-1 09:22:30 | 显示全部楼层
在线等 谁知道的
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-4-1 11:54:55 | 显示全部楼层
没人回答啊 靠自己顶一下了 不知道我们老师的电话是多少
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-4-1 14:49:52 | 显示全部楼层
我在定  郁闷阿
回复 支持 反对

使用道具 举报

发表于 2005-4-2 06:19:00 | 显示全部楼层
I like a sentence from the LFS handbook, "To compile a compiler, you need a compiler".

If you don't have a compiler installed in your system, how can you compile your compiler (gcc)?

First of all, you should install the gcc binary, not the gcc source code.  You have not described the distribution you are using.

In Debian, you should:

apt-get install gcc

In RedHat, you should install the gcc binary packages with rpm.

Of course, you should look for the right version of gcc to install. gcc-3.3.x is suggested.  As you are not familiar with gcc, gcc-3.4.x is not recommended to you because you may encounter compatibility problems.

Once you have gcc installed, you can proceed to compile your game.
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-4-2 17:46:40 | 显示全部楼层
我知道 解决方法了 我装了个rpm 的gcc 包 安装的时候 要求安装cpp 跟 glibc 两个都装完后 gcc 的rpm包就可以顺利安装 了

谢谢
回复 支持 反对

使用道具 举报

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

本版积分规则

快速回复 返回顶部 返回列表