在 CentOS 系统中,您可以通过以下命令查看 GCC 版本:
打开终端(Terminal)。
输入以下命令并按回车键:
gcc --version
这将显示 GCC 的版本信息,例如:
gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-44)
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
在这个例子中,GCC 的版本是 4.8.5。请注意,您的版本可能会有所不同。