CentOS安装gcc 4.4并保留原有版本

其实在CentOS中,yum库已经独立出了gcc 4.4,可以单独安装:

yum install gcc44 gcc44-c++

在使用gcc 4.4编译时,要进行必要环境变量设置:

export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/
export CC=gcc44
export CXX=g++44
export PKG_CONFIG=/usr/bin/pkg-config

Leave a comment