日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

安装gcc 4.8.2 for cxx 11

發布時間:2025/3/21 编程问答 37 豆豆
生活随笔 收集整理的這篇文章主要介紹了 安装gcc 4.8.2 for cxx 11 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

1? ftp://gd.tuwien.ac.at/gnu/gcc/releases/gcc-4.8.2/ 下載解壓,configure報錯, 報錯:

configure: error: Building GCC requires GMP 4.2+, MPFR 2.4.0+ and MPC 0.8.0+. Try the --with-gmp, --with-mpfr and/or --with-mpc options to specify their locations.
2 下載/安裝三個庫; 或者查看? ./contrib/download_prerequisites.sh

tar -xvf gmp-5.0.5.tar.bz2

cd gmp-5.0.5

./configure && make && make check && make install;??? 頭文件在/usr/local/inclue/下, 庫在/usr/local/lib/下


wget http://www.mpfr.org/mpfr-current/mpfr-3.1.2.tar.bz2

tar xvf mpfr-3.1.2.tar.bz2

cd mpfr-3.1.2

./configure --with-gmp-include=/usr/local/include --with-gmp-lib=/usr/local/lib? && make && make install


tar xvf mpc-1.0.tar.gz

cd mpc-1.0

./configure --with-gmp-include=/usr/local/include --with-gmp-lib=/usr/loca/lib --with-mpfr-include=/usr/local/include --with-mpfr-lib=/usr/local/lib

make && make install


/sbin/ldconfig


3 安裝gcc?? https://gcc.gnu.org/install/

./configure --prefix=/usr/local/gcc-4.8.2 --enable-threads=posix --disable-checking --disable-multilib --enable-languages=c,c++ --with-gmp=/usr/local --with-mpfr=/usr/local --with-mpc=/usr/local

make;報錯

centos 5.4 cc1plus: error: unrecognized command line option "-Wno-overlength-strings" g++ (GCC) 4.1.2 20080704 (Red Hat 4.1.2-48) man g++沒發現有這個選項。 g++版本低 腫么辦? 好像是4.3加入的這個選項。 得先升到4.3,再升到4.8 ?. 直接去掉這個選項試試(安裝成功、程序運行也沒多大問題。該選項是和超長字符串有關509)。centos 6.4 64位 g++ (GCC) 4.4.7 20120313 (Red Hat 4.4.7-4) 沒這問題

configure: error: cannot compute suffix of object files: cannot compile。 將依賴庫路徑加到搜索路徑下, /sbin/ldconfig
make && make install


然后查看gcc/g++, 讓其指向新裝版本的gcc/g++


有些機器上回報錯 /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.14'

strings /usr/lib64/libstdc++.so.6 | grep GLIBC 可以發現無3.4.14;

同理將 /usr/lib64/libstdc++.so.6 指向新裝的gcc下的libstdc++.so.6!!!直接指向最新的libstdc++.so.6.0.18, 否則有可能運行時會報錯GLIBCXX 版本問題



4 安裝新版本gdb

安裝gdb有可能報錯缺少 termcap library

yum -y install ncurses.x86_64

yum -y install ncurses-devel.x86_64


用gdb調試時,會報錯 Dwarf Error: wrong version in compilation unit header (is 4, should be 2)

從網上搜到的改 gcc選項無錫哦啊, 看到的棧幀和源代碼。

因此安裝新版本gdb即可。

wget http://ftp.gnu.org/gnu/gdb/gdb-7.8.tar.gz

解壓

./configure && make && make install

















以下是別人筆記






我的環境:CentOS 6.2, kernel 3.1.10 ?x86_64
需要的配置:Disk space >= 6GB, Mem >= 1GB

從gcc.gnu.org下載gcc-4.8.2.tar.bz2,創建/root/buid-gcc目錄,以后所有編譯都在這個目錄里進行了。
到ftp://gcc.gnu.org/pub/gcc/infrastructure/處下載以下輔助安裝包:gmp-4.3.2.tar.bz2,?mpfr-2.4.2.tar.bz2,?mpc-0.8.1.tar.gz

將以上bz2和gz ball全部放到/root/build-gcc目錄下。

1. 編譯gmp-4.3.2
展開gmp-4.3.2.tar.bz2:
#tar xf gmp-4.3.2.tar.bz2
#mkdir gmp-build
#cd gmp-build
#../gmp-4.3.2/configure --prefix=/root/rpmbuild/gmp-build?
--build=x86_64-linux
注意:
--build=x86_64-linux選項對于x86_64的平臺(比如我用的這個系統)非常重要,否則,無法生成Makefile。
生成Makefile以后,用以下命令編譯:
#make
#make check
#make install
這樣就把gmp安裝到了
/root/build-gcc/gmp-build目錄,gmp的安裝就完成了,/root/build-gcc/gmp-build目錄在將來安裝其他包的時候會作為參數被傳遞。

2. 編譯mpfr
#tar xf?mpfr-2.4.2.tar.bz2
#mkdir mpfr-build
#cd mpfr-build
#
../mpfr-2.4.2/configure --prefix=/root/build-gcc/mpfr-build/ --with-gmp=/root/build-gcc/gmp-build
#make
#make check
#make install

3.編譯mpc
#tar xf mpc-0.8.1.tar.gz
#mkdir mpc-build
#cd mpc-build
#../mpc-0.8.1/configure --prefix=/root/build-gcc/mpc-build/ --with-gmp=/root/build-gcc/gmp-build/ --with-mpfr=/root/build-gcc/mpfr-build/
#make; make check; make install

4.編譯GCC
#tar xf gcc-4.7.2.tar.bz2
#mkdir gcc-build
設置LD_LIBRARY_PATH (可選)
#export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/root/build-gcc/mpc-build/lib:/root/build-gcc/mpfr-build/lib:/root/build-gcc/gmp-build/lib
創建makefile
#../gcc-4.7.2/configure --prefix=/root/build-gcc/gcc-build/ --enable-threads=posix --disable-checking --disable-multilib --enable-languages=c,c++ --with-gmp=/root/build-gcc/gmp-build/ --with-mpfr=/root/build-gcc/mpfr-build/ --with-mpc=/root/build-gcc/mpc-build/

Build過程中可能出現的錯誤:
有些包沒裝(雖然之前已經通過命令#
yum groupinstall "Development Tools" 安裝了"Development Tools"),比如ppl和ppl-devel,可能會出現錯誤:configure: error: cannot compute suffix of object files: cannot compile。查看日志發現錯誤記錄: conftest.c:10:19: error: ppl_c.h: No such file or directory conftest.c:16: error: 'choke' undeclared (first use in this function) conftest.c:16: error: (Each undeclared identifier is reported only once conftest.c:16: error: for each function it appears in.) conftest.c:16: error: expected ';' before 'me' 這些錯誤可以通過命令:
#yum install ppl ppl-devel
安裝這兩個包來改正。

另外,如果嚴謹一點, make完后應該要做make -k check的,但是make -k check會報告缺少autogen這個命令,可問題在于CentOS里很難找到這個autogen,所以,馬虎點好了,make完后直接make install。

make install完成后,將會在/root/build-gcc/gcc-build/bin目錄下生成最終的可執行文件,如gcc,g++這些。而這時,
/root/build-gcc/gcc-build/bin并不存在于PATH中。這就需要將新生成的gcc放到/usr/bin中,讓其“可用”了:
#ln -s /root/build-gcc/gcc-build/bin/gcc /usr/bin/gcc-4.7
#ln -s /root/build-gcc/gcc-build/bin/g++ /usr/bin/g++-4.7
注意:以上必須用絕對路徑!

其后就可以用gcc-4.7和g++-4.7命令編程序了?
http://blog.csdn.net/foreverdengwei/article/details/8691181


參考的資料:?http://blog.csdn.net/sstower/article/details/5624010

http://guliqun1983.blog.163.com/blog/static/50111685201162821716214/

http://www.cnblogs.com/chuncn/archive/2010/10/15/1851853.html


原文:http://chenjiajie.org/post/2012-11-25/40042373551










































































以下是別人的筆記。。。































以下來源于網絡。








from http://blog.csdn.net/stormbjm/article/details/9107831

準備工作

  • 下載并解壓gcc源碼包

    從http://ftp.gnu.org/gnu/gcc 下載一個你想要編譯的gcc源碼包。 比如下載的是gcc-4.7.2.tar.bz2,然后用輸入解壓命令 tar -xvf 4.7.2.tar.bz2

  • 安裝所需的庫

    在使用./configure配置的時候,可能會遇到如下錯誤: configure: error: Building GCC requires GMP 4.2+, MPFR 2.3.1+ and MPC 0.8.0+.

    這說明需要用到GMP MPFRMPC 這三個庫。 傳送門:GMP下載MPFR下載MPC下載

    因為MPFR和MPC都依賴于GMP包,所以首先安裝GMP。

    $ tar -xvf gmp-5.0.5.tar.bz2

    在Linux下手動編譯軟件時,要養成建立build目錄的好習慣,所以建立一個gmp-5.0.5-build目錄

    $ mkdir gmp-5.0.5-build

    $ cd gmp-5.0.5-build

    $./../gmp-5.0.5/configure (可以使用配置參數--prefix=指定安裝位置,這里使用默認 /usr/local/include 和/usr/local/lib)

    $make

    $make check (這一步用來確保編譯正確)

    $sudo make install

    在執行configure的時候可能會提示錯誤:checking for suitable m4... configure: error: No usable m4 in $PATH or /usr/5bin

    這就說明我們還要安裝m4這個庫,傳送門:m4

    $ tar -xvf m4-1.4.16.tar.bz2

    $ mkdir m4-1.4.16-build

    $ cd m4-1.4.16-build

    $ ./../m4-1.4.16-build/configure

    $ make

    $ make check

    $ sudo make install

    $ man m4 (如果可以成功man m4,就說明這個庫安裝成功)

    安裝完m4后,我們繼續回到之前gmp-5.0.5-build的目錄,繼續進行configure操作。

    接著安裝MPFR這個庫

    $ tar -xvf mpfr-3.1.1

    $ mkdir mpfr-3.1.1-build

    $ cd mpfr-3.1.1-build

    $ ./../mpfr-3.1.1/configure --with-gmp-include=/usr/local/include --with-gmp-lib=/usr/local/lib (由于mpfr依賴于gmp這個庫,所以在configure時,需要設置好gmp庫所在的位置,供安裝mpfr庫時使用。)

    $ make

    $ make check

    $ sudo make install

    接著安裝MPC這個庫

    $ tar -xvf mpc-1.0.1

    $ mkdir mpc-1.0.1-build

    $ cd mpc-1.0.1-build

    $ ./../mpc-1.0.1/configure --with-gmp-include=/usr/local/include --with-gmp-lib=/usr/loca/lib

    $ make

    $ make check

    $ sudo make install

    需要的庫都安裝完后,為了防止編譯gcc時找不到這三個庫,所以需要確認庫位置是否在環境變量中 LD_LIBRARY_PATH中

    $ echo $LD_LIBRARY_PATH

    如果沒有的話,手動添加即可

    $ export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/local/lib"

    為了以后使用的時候不再設置,我們可以修改/etc/bashprofile或者/etc/profile。這里修改的是全局變量,對所有用戶有效,修改~/.bashprofile 和~/.profile可以修改用戶的全局變量。

    $ sudo vim /etc/profile

    添加以下兩句:

    export LD_LIBRARY_PATH=/usr/local/lib

    LD_LIBRARYPATH=:/usr/local/gcc-4.7.2/lib:$LD_LIBRARYPATH

    保存退出

    $ souce /etc/profile

    做完這些準備工作后,就可以開始編譯gcc了

  • 構建build目錄,開始編譯

    $ mkdir gcc-4.7.2-build

    $ cd gcc-4.7.2-build

    接下來要執行configure進行一系列的配置,在[GCC官方網站】(http://gcc.gnu.org/install/configure.html)可以看到一系列的配置。我在編譯的時候是參考我機子上原來的配置進行了一點點小改動。

    我在我的終端下使用

    $ gcc -v

    出現了一些列的信息: Target: i686-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.4.4-14ubuntu5.1' --with-bugurl=file:///usr/share/doc/gcc-4.4/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.4 --enable-shared --enable-multiarch --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.4 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --enable-targets=all --disable-werror --with-arch-32=i686 --with-tune=generic --enable-checking=release --build=i686-linux-gnu --host=i686-linux-gnu --target=i686-linux-gnu Thread model: posix gcc version 4.4.5 (Ubuntu/Linaro 4.4.4-14ubuntu5.1)

    上面的配置很多,我挑選了幾個,最后使用configure配置如下:

    $ ../gcc-4.7.2/configure --prefix=/usr/local/gcc-4.7.2 --enable-threads=posix --disable-checking --enable-languages=c,c++,objc(或者--enable-threads=posix --disable-checking --disable-multilib --enable-languages=c,c++

    接著執行make

    $ make

    結果遇到錯誤:gengtype.c:923: undefined reference to `lexer_line'

    按照網上的方法安裝一些工具和編譯環境: build-essential bison flex

    本來想裝個X,用源碼安裝GCC,沒想到又得借助強大的apt-get了 :(

    $ sudo apt-get install build-essential bison flex

    $ make clean (清除下之前沒成功編譯的文件)

    $ make (繼續make)

    又遇到錯誤:gengtype.c:923: undefined reference to `lexer_line'

    查看build目錄下的config.log (查看log真的很有用!),發現問題:conftest.c:10: fatal error: ppl_c.h: No such file or directory

    上網查閱資料,需要安裝ppl還有cloog的庫.這里有介紹:傳送門

    (= = 原諒我再次使用apt-get)

    $ sudo apt-get install libppl0.10-dev

    $ sudo apt-get install libcloog-ppl-dev

    完了之后:

    $ make distclean (make clean和make distclean的區別可以參考:傳送門)

    $ make

    這次終于make好了,沒有什么錯誤。保險起見,再

    $ make check

    結果又有錯誤: /bin/bash: autogen: 未找到命令

    上網查了下,autogen這個庫沒裝,安之!!

    $ sudo apt-get install autogen

    $ make check

    總算是沒什么問題了。接著我們

    $ sudo make install

    這步很快就執行完了。 接者我們用gcc -version 查看,版本還是原來的gcc4.4,并沒有gcc4.7.2,這是因為gcc4.7.2的可執行文件還沒有加入到搜索命令路徑中,所以我們要手動加入。

    -添加新版gcc的可執行文件到命令搜索路徑中

    首先用which命令查看使用gcc時,系統調用的是哪個路徑下的gcc

    $ which gcc

    $ /usr/bin/gcc (說明gcc命令調用的是這個路徑下的gcc)

    為此,我們要使用ln命令,建立一個鏈接,讓 /usr/bin/gcc 指向我們安裝目錄下的gcc. 因為我之前的/usr/bin/gcc已經指向了gcc4.4,所以,先刪除這個鏈接。

    $ sudo rm /usr/bin/gcc

    然后,進行將gcc使用軟鏈接到gcc4.7.2

    $ sudo ln -s /usr/local/gcc-4.7.2/bin/gcc /usr/bin/gcc

    接著,查看下gcc的版本看看有沒有成功!

    $ gcc --version

    $ gcc (GCC) 4.7.2 Copyright ? 2012 Free Software Foundation, Inc. 本程序是自由軟件;請參看源代碼的版權聲明。本軟件沒有任何擔保; 包括沒有適銷性和某一專用目的下的適用性擔保。

    成功了!我們在用同樣的方法重新鏈接下g++,就能使用g++4.7.2了!

    $ which g++

    $ /usr/bin/g++

    $ sudo rm /usr/bin/g++

    $ sudo ln -s /usr/loca/gcc-4.7.2/bin/g++ /usr/bin/g++

    $ g++ -version

    $ g++ (GCC) 4.7.2 Copyright ? 2012 Free Software Foundation, Inc. 本程序是自由軟件;請參看源代碼的版權聲明。本軟件沒有任何擔保; 包括沒有適銷性和某一專用目的下的適用性擔保。

  • 最后,隨便編寫一個小程序,使用gcc來測試一下吧!

另外一篇:

首先在配置gcc的過程中會出現錯誤:gcc configure: error: Building GCC requires GMP 4.2+, MPFR 2.3.1+ and MPC 0.8.0+

說明要安裝gcc需要GMP、MPFR、MPC這三個庫,可從ftp://gcc.gnu.org/pub/gcc/infrastructure/下載相應的壓縮包。由于MPFR依賴GMP,而MPC依賴GMP和MPFR,所以要先安裝GMP,其次MPFR,最后才是MPC。這里三個庫我用的版本分別是gmp4.3.2,mpfr2.4.2和mpc0.8.1。

先開始安裝GMP。解壓GMP的壓縮包后,得到源代碼目錄gmp-4.3.2。在該目錄的同級目錄下建立一個臨時的編譯目錄,這里命名為gmp-build。然后開始配置安裝選項,進入gmp-build目錄,輸入以下命令進行配置:

../gmp-4.3.2/configure --prefix=/usr/local/gmp-4.3.2

這里--prefix選項代表要將該庫安裝在哪里,我是裝在/usr/local/gmp-4.3.2目錄下,后面的安裝都會用到這個選項。

這時在gmp的編譯目錄下就會生成一個makefile文件,現在開始編譯安裝。

make

make check

sudo make install

這樣就安裝好了gmp。mpfr和mpc的安裝方法與此類似。不過要注意配置的時候要把依賴關系選項加進去,具體后面兩個庫配置命令如下:

../mpfr-2.4.2/configure? --prefix=/usr/local/mpfr-2.4.2 --with-gmp=/usr/local/gmp-4.3.2

../mpc-0.8.1/configure --prefix=/usr/local/mpc-0.8.1 --with-gmp=/usr/local/gmp-4.3.2 --with-mpfr=/usr/local/mpfr-2.4.2

安裝好這三個庫之后,就可以正式開始安裝gcc了。

與此前一樣,先建一個編譯gcc的臨時目錄gcc-build,進入該目錄后配置安裝選項:

../gcc-4.4.3/configure --prefix=/usr/local/gcc-4.4.3 --enable-threads=posix --disable-checking --disable-multilib --enable-languages=c,c++ --with-gmp=/usr/local/gmp-4.3.2 --with-mpfr=/usr/local/mpfr-2.4.2 --with-mpc=/usr/local/mpc-0.8.1

gcc的配置選項有很多,具體可以參考gcc源文件目錄下的安裝說明。這里只安裝了c和c++的編譯器。(如果不指定編譯的語言,則會在make時不通過,爆出某些文件找不到等錯誤,所以還是建議在此指定編譯語言為c,c++)然后開始make編譯。為保險起見,需要在環境變量LD_LIBRARY_PATH添加前面三個庫的位置,鍵入以下命令:

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/mpc-0.8.1/lib:/usr/local/gmp-5.0.1/lib:/usr/local/mpfr-2.4.2/lib

然后重新make編譯,在經過漫長的1小時等待后,終于編譯完成。在安裝說明里面還有測試這一步,不過那是可選的。直接make install安裝,至此gcc就全部安裝完成了。不過目前還不能使用新版本的gcc,因為新版的可執行文件還沒加到命令的搜索路徑中。在這里我為新版的gcc和g++命令分別建立了一個軟鏈接。進入/usr/bin目錄后,鍵入如下命令建立軟鏈接。

sudo ln -s /usr/local/gcc-4.4.3/bin/gcc gcc44

sudo ln -s /usr/local/gcc-4.4.3/bin/g++ g++44

這樣我使用新版本gcc的時候就可以用gcc44和g++44命令,同時也可使用原來的gcc編譯程序。當然這里也可以直接將/usr/bin目錄下gcc,g++命令重新鏈接到新版本的gcc可執行文件。在正式使用之前還有最后一個工作要做,就是將前面安裝的三個庫的路徑加進環境變量LD_LIBRARY_PATH中,不然在編譯程序的時候會出錯。由于我不想每次編譯程序都生成環境變量,所以需要編輯/etc目錄下的bashrc文件配置shell環境。在這個文件中添加以下語句:

LD_LIBRARY_PATH=:/usr/local/mpc-0.8.1/lib:/usr/local/gmp-4.3.2/lib:/usr/local/mpfr-2.4.2/lib:/usr/local/gcc-4.4.3/lib

export LD_LIBRARY_PATH

保存重啟系統后,就可以使用新裝的gcc了。

以上就是我在CentOS?5.5安裝gcc4.4.3的全過程。



出現問題make的時候提示如下:

Checking for suffix of object files... configure: error: in `/home/wulei/sourcecode/gcc-4.6.2/i686-pc-linux-gnu/libgcc':

configure: error: cannot compute suffix of object files: cannot compile

See `config.log' for more details.

make[2]: *** [configure-stage1-target-libgcc] 錯誤 1

make[2]:正在離開目錄 `/home/wulei/sourcecode/gcc-4.6.2'

make[1]: *** [stage1-bubble] 錯誤 2

make[1]:正在離開目錄 `/home/wulei/sourcecode/gcc-4.6.2'

make: *** [all] 錯誤 2

?

于是 進入/home/wulei/sourcecode/gcc-4.6.2/i686-pc-linux-gnu/libgcc查看這個路徑下的config.log

發現如下的錯誤提示:

/home/wulei/sourcecode/gcc-4.6.2/host-i686-pc-linux-gnu/gcc/cc1: error while loading shared libraries: libmpfr.so.1: cannot open shared ob ? ?ject file: No such file or directory

?

上網查找這個問題

原因是因為linux在make的時候沒有自動尋找新加入的庫所以要用命令加入

LD_LIBRARY_PATH=/usr/local/mpc-0.8.1/lib:/usr/local/mpfr-2.4.2/lib:/usr/local/gmp-4.3.2/lib

echo $LD_LIBRARY_PATH

export $LD_LIBRARY_PATH



參考:
http://www.comdyn.cn/from-web/68-server-setup/164-centos-48-gcc450.html



1? ftp://gd.tuwien.ac.at/gnu/gcc/releases/gcc-4.8.2/ 下載解壓,configure報錯, 報錯:

configure: error: Building GCC requires GMP 4.2+, MPFR 2.4.0+ and MPC 0.8.0+. Try the --with-gmp, --with-mpfr and/or --with-mpc options to specify their locations.
2 下載/安裝三個庫; 或者查看?./contrib/download_prerequisites.sh

tar -xvf gmp-5.0.5.tar.bz2

cd gmp-5.0.5

./configure && make && make check && make install;??? 頭文件在/usr/local/inclue/下, 庫在/usr/local/lib/下


wget http://www.mpfr.org/mpfr-current/mpfr-3.1.2.tar.bz2

tar xvf mpfr-3.1.2.tar.bz2

cd mpfr-3.1.2

./configure --with-gmp-include=/usr/local/include --with-gmp-lib=/usr/local/lib? && make && make install


tar xvf mpc-1.0.tar.gz

cd mpc-1.0

./configure --with-gmp-include=/usr/local/include --with-gmp-lib=/usr/loca/lib --with-mpfr-include=/usr/local/include --with-mpfr-lib=/usr/local/lib

make && make install


/sbin/ldconfig


3 安裝gcc?? https://gcc.gnu.org/install/

./configure --prefix=/usr/local/gcc-4.8.2 --enable-threads=posix --disable-checking --disable-multilib --enable-languages=c,c++ --with-gmp=/usr/local --with-mpfr=/usr/local --with-mpc=/usr/local

make;報錯

centos 5.4 cc1plus: error: unrecognized command line option "-Wno-overlength-strings" g++ (GCC) 4.1.2 20080704 (Red Hat 4.1.2-48) man g++沒發現有這個選項。 g++版本低 腫么辦? 好像是4.3加入的這個選項。 得先升到4.3,再升到4.8 ?. 直接去掉這個選項試試(安裝成功、程序運行也沒多大問題。該選項是和超長字符串有關509)。centos 6.4 64位 g++ (GCC) 4.4.7 20120313 (Red Hat 4.4.7-4) 沒這問題

configure: error: cannot compute suffix of object files: cannot compile。 將依賴庫路徑加到搜索路徑下, /sbin/ldconfig
make && make install


然后查看gcc/g++, 讓其指向新裝版本的gcc/g++


有些機器上回報錯 /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.14'

strings /usr/lib64/libstdc++.so.6 | grep GLIBC 可以發現無3.4.14;

同理將 /usr/lib64/libstdc++.so.6 指向新裝的gcc下的libstdc++.so.6!!!直接指向最新的libstdc++.so.6.0.18, 否則有可能運行時會報錯GLIBCXX 版本問題



4 安裝新版本gdb

用gdb調試時,會報錯 Dwarf Error: wrong version in compilation unit header (is 4, should be 2)

從網上搜到的改 gcc選項無錫哦啊, 看到的棧幀和源代碼。

因此安裝新版本gdb即可。

wget http://ftp.gnu.org/gnu/gdb/gdb-7.8.tar.gz

解壓

./configure && make && make install

總結

以上是生活随笔為你收集整理的安装gcc 4.8.2 for cxx 11的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。

主站蜘蛛池模板: 国产成人免费视频网站 | 成人性生交大片免费看r链接 | 乱老熟女一区二区三区 | 色亭亭 | 国产超碰人人爽人人做人人爱 | 国产亚洲精品aaaaaaa片 | 韩产日产国产欧产 | 日韩小视频在线观看 | 日韩avwww | 欧美性第一页 | 国产亚洲一区二区不卡 | 隣の若妻さん波多野结衣 | 中文在线视频观看 | 国产丝袜视频在线观看 | www.国产精品.com | 亚洲m码 欧洲s码sss222 | 91香草视频| 欧美一a一片一级一片 | 加勒比波多野结衣 | 国产第9页 | 男女爽爽视频 | 中文字幕无产乱码 | 大乳丰满人妻中文字幕日本 | 亚洲色图欧美色 | 久久av一区二区三区漫画 | 精品免费av | 高潮又黄又刺激 | 亚洲图片在线 | 国产精品美女高潮无套 | 黄色大片网站 | 一级片视频免费 | 日韩一区二区三区不卡视频 | 自拍偷拍p | 日韩一级一级 | 欧日韩视频 | www.一级片 | 日韩精品欧美 | 林天顾悦瑶笔趣阁 | 在线观看av免费 | 国产亚洲视频在线观看 | 奇米激情 | a级黄视频 | 91视频最新 | 国产伦精品一区二区三区免.费 | 国产精品视频你懂的 | 欧美在线 | 亚洲 | 国产一级片免费播放 | 性涩av | 9999精品| 少妇高潮毛片 | 国产在线三区 | 国产专区一区二区三区 | 去毛片 | 99自拍偷拍视频 | 偷拍超碰| 国产成人在线视频播放 | 无码精品在线观看 | 欧美成人精品一区二区男人看 | 亚洲视频日韩 | 国产精品传媒麻豆hd | 日本猛少妇色xxxxx | 欧洲最强rapper网站直播 | 久久久久久久久久久久久久久久久 | 成年网站在线播放 | 国产欧美精品区一区二区三区 | 久久精品—区二区三区舞蹈 | 国产精品国产三级国产在线观看 | 中文字幕亚洲综合 | 亚洲资源在线播放 | 欧美亚洲国产精品 | 少妇精品亚洲一区二区成人 | 精品自拍一区 | 99国产精品久久久久久久成人热 | 亚洲午夜久久久久久久久久久 | 国产欧美日韩 | 91一区| 打开免费观看视频在线播放 | 91福利网址| 性久久久久久久久久久久 | 九九少妇 | 欧美一级二级在线观看 | 大地资源影视在线播放观看高清视频 | 欧美午夜精品久久久久久孕妇 | 欧美日韩免费一区二区三区 | 日韩久久久| 香蕉免费在线视频 | 伊人影院综合 | 日韩成人无码影院 | 国产精品污www一区二区三区 | 99精品欧美一区二区 | 午夜视频免费观看 | 91精品视频国产 | 国产美女白浆 | 精品人妻无码一区二区 | 18禁免费观看网站 | 神马九九| 国产无遮掩 | 国产黄色在线网站 | 粉色视频网站 |