OS/Linux

C++ 4.8.2 설치 (Centos 6.5)

아르비스 2016. 3. 6. 22:33

[gcc 소스 다운로드]

wget http://ftp.tsukuba.wide.ad.jp/software/gcc/releases/gcc-4.8.2/gcc-4.8.2.tar.bz2


[gcc 압축 해제]

tar -jxvf gcc-4.8.2.tar.bz2


[gcc 컴파일에 필요한 라이브러리 다운로드. 일일이 받을 필요 없음...]

cd gcc-4.8.2

./contrib/download_prerequisites



[gcc 빌드]

./configure --prefix=/usr/local/gcc-4.8.2 --enable-checking=release --enable-languages=c,c++ --disable-multilib


make -j4


[gcc 설치]

make install


[gcc 빌드 끝. 버전 확인!]

gcc —version


[/etc/profile 수정]

vi /etc/profile


export GCC=/usr/local/gcc-4.8.2

export C_INCLUDE_PATH=$GCC/include/c++/4.8.2/

export CPLUS_INCLUDE_PATH=$GCC/include/c++/4.8.2/

export LD_LIBRARY_PATH=$GCC/lib64:$PPL/lib:$LD_LIBRARY_PATH

export PATH=$GCC/bin:$PATH