-3

想问一下我在linux上安装gcc后,在哪里可以找到并打开它。我需要它来编译 c/c++ 代码。仅供参考,我正在使用通过 yum install gcc gcc-c++ autoconf automake 命令安装的 centos 5.5 和 gcc 并成功。

谢谢

4

2 回答 2

1

gcc是一个命令行程序,而不是一个用于编写、编译、运行程序的图形环境。你用一些文本编辑器写你的文件,比如geditor vimor emacsor... Unix/Linux 上也有 IDE(集成开发环境),但我个人喜欢用xemacs.

于 2013-02-19T02:39:06.580 回答
0

Open a terminal/console and change to the directory (with cd path/to/directory) with the source code you want to compile.
With the command gcc sourcefile1.c sourcefile2.c -o output you compile your own simple programs.

When you've downloaded a complexer program there is normally a configure file and a make file. First execute ./configure which will check if your system satisfies all dependencies for the program and then execute make which build (compiles) everything. Most programs support sudo make install too, which will install the program on the whole system (normally in /usr/bin/).

于 2013-02-19T06:36:02.820 回答