跳转至内容

GNU Compiler Collection

来自 ArchWiki

GNU 编译器套装 (GCC) 是 GNU 工具链的一部分,并包含 CC++ 的前端。

安装

安装 gcc 软件包。

其他可用的前端包括:

旧版本

旧版本的 GCC 可能在历史研究、无法在当前版本上编译的旧项目或测试项目的兼容性时非常有用

旧版本 GCC 的其他前端可以在官方仓库和 AUR 中通过搜索 gcc<不带点的版本号> 找到,例如搜索 gcc9 以寻找 GCC 9 的前端。

提示 使用 CC(针对 C)[1]CXX(针对 C++)[2] 环境变量 来指定在 make 或 cmake 等工具中使用哪个版本的 GCC。例如
$ export CC=gcc-12 CXX=g++-12

参见

© . This site is unofficial and not affiliated with Arch Linux.

Content is available under GNU Free Documentation License 1.3 or later unless otherwise noted.