gcc --version 此命令将显示当前系统默认的GCC版本信息。 2. 选择需要使用的GCC版本 Ubuntu系统通常支持安装多个版本的GCC。如果您需要安装特定版本的GCC(例如GCC 9),可以使用以下命令: bash sudo apt-get install gcc-9 g++-9 安装完成后,您可以使用update-alternatives工具来管理和切换GCC版本。 3. 配置环境...
http://stackoverflow.com/questions/7832892/how-to-change-the-default-gcc-compiler-in-ubuntu To figure out the current priorities of gcc, type in the command pointed out by @tripleee's comment: 代码语言:javascript 复制 查看当前的可切换的版本: update-alternatives --query gcc 代码语言:javascript...