鱼C论坛

 找回密码
 立即注册
楼主: xg-sco

[已解决]fatal error: bits/c++config.h: No such file or directory

[复制链接]
 楼主| 发表于 2021-8-9 21:06:08 | 显示全部楼层
  1. [root@localhost chapter5]# yum search build-essential
  2. Loaded plugins: fastestmirror, langpacks
  3. Loading mirror speeds from cached hostfile
  4. * base: mirrors.tuna.tsinghua.edu.cn
  5. * extras: mirrors.ustc.edu.cn
  6. * updates: mirrors.ustc.edu.cn
  7. Warning: No matches found for: build-essential
  8. No matches found
复制代码
  1. [root@localhost chapter5]# yum search gcc
  2. Loaded plugins: fastestmirror, langpacks
  3. Loading mirror speeds from cached hostfile
  4. * base: mirrors.nju.edu.cn
  5. * extras: mirrors.ustc.edu.cn
  6. * updates: mirrors.ustc.edu.cn
  7. =============================================== N/S matched: gcc ===============================================
  8. gcc-c++.x86_64 : C++ support for GCC
  9. gcc-gnat.x86_64 : Ada 95 support for GCC
  10. gcc-objc.x86_64 : Objective-C support for GCC
  11. gcc-objc++.x86_64 : Objective-C++ support for GCC
  12. gcc-plugin-devel.x86_64 : Support for compiling GCC plugins
  13. libgcc.i686 : GCC version 4.8 shared support library
  14. libgcc.x86_64 : GCC version 4.8 shared support library
  15. relaxngcc-javadoc.noarch : Javadoc for relaxngcc
  16. compat-gcc-44.x86_64 : Compatibility GNU Compiler Collection
  17. compat-gcc-44-c++.x86_64 : C++ support for compatibility compiler
  18. compat-gcc-44-gfortran.x86_64 : Fortran support for compatibility compiler
  19. gcc.x86_64 : Various compilers (C, C++, Objective-C, Java, ...)
  20. gcc-gfortran.x86_64 : Fortran support
  21. gcc-go.x86_64 : Go support
  22. libgomp.i686 : GCC OpenMP v3.0 shared support library
  23. libgomp.x86_64 : GCC OpenMP v3.0 shared support library
  24. libmudflap.i686 : GCC mudflap shared support library
  25. libmudflap.x86_64 : GCC mudflap shared support library
  26. libmudflap-devel.i686 : GCC mudflap support
  27. libmudflap-devel.x86_64 : GCC mudflap support
  28. libquadmath.i686 : GCC __float128 shared support library
  29. libquadmath.x86_64 : GCC __float128 shared support library
  30. libquadmath-devel.i686 : GCC __float128 support
  31. libquadmath-devel.x86_64 : GCC __float128 support
  32. relaxngcc.noarch : RELAX NG Compiler Compiler

  33.   Name and summary matches only, use "search all" for everything.
复制代码
小甲鱼最新课程 -> https://ilovefishc.com
回复

使用道具 举报

发表于 2021-8-9 21:13:31 | 显示全部楼层
我这边没有 centos
我这边用的 archlinux,我这边也没有 bits/c++config.h 这个文件,但是编译不报错
我想重新安装一下 gcc 试试
创建一个虚拟机快照,虽然重新安装 gcc 应该不会出问题,不过还是创建一个保险
yum remove gcc
yum install gcc
小甲鱼最新课程 -> https://ilovefishc.com
回复

使用道具 举报

发表于 2021-8-9 21:21:56 | 显示全部楼层
我试过了,在我这边把 gcc 删除了,没有任何问题,知道我为什么敢试吗?因为我创建了快照,^_^
不知道 centos 怎么样,应该也没问题吧
小甲鱼最新课程 -> https://ilovefishc.com
回复

使用道具 举报

 楼主| 发表于 2021-8-9 21:26:53 | 显示全部楼层
人造人 发表于 2021-8-9 21:21
我试过了,在我这边把 gcc 删除了,没有任何问题,知道我为什么敢试吗?因为我创建了快照,^_^
不知道 cen ...

刚创建完快照,现在在安装gcc,其实我昨天重新安装了gcc一次了
小甲鱼最新课程 -> https://ilovefishc.com
回复

使用道具 举报

 楼主| 发表于 2021-8-9 21:27:48 | 显示全部楼层
人造人 发表于 2021-8-9 21:21
我试过了,在我这边把 gcc 删除了,没有任何问题,知道我为什么敢试吗?因为我创建了快照,^_^
不知道 cen ...

gcc安装好了
小甲鱼最新课程 -> https://ilovefishc.com
回复

使用道具 举报

 楼主| 发表于 2021-8-9 21:34:08 | 显示全部楼层
人造人 发表于 2021-8-9 21:21
我试过了,在我这边把 gcc 删除了,没有任何问题,知道我为什么敢试吗?因为我创建了快照,^_^
不知道 cen ...

再次编译
  1. [root@localhost chapter5]# g++ test2.cpp
  2. bash: /usr/bin/g++: No such file or directory
复制代码
小甲鱼最新课程 -> https://ilovefishc.com
回复

使用道具 举报

发表于 2021-8-9 21:44:40 | 显示全部楼层

安装 gcc 的时候用这个命令
yum install gcc gcc-c++ kernel-devel
参考:https://fishc.com.cn/thread-65022-1-1.html
小甲鱼最新课程 -> https://ilovefishc.com
回复

使用道具 举报

 楼主| 发表于 2021-8-9 21:48:11 | 显示全部楼层
人造人 发表于 2021-8-9 21:44
安装 gcc 的时候用这个命令
yum install gcc gcc-c++ kernel-devel
参考:https://fishc.com.cn/thread ...
  1. [root@localhost chapter5]# g++ -v
  2. Using built-in specs.
  3. COLLECT_GCC=g++
  4. COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/4.8.5/lto-wrapper
  5. Target: x86_64-redhat-linux
  6. Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-languages=c,c++,objc,obj-c++,java,fortran,ada,go,lto --enable-plugin --enable-initfini-array --disable-libgcj --with-isl=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/isl-install --with-cloog=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/cloog-install --enable-gnu-indirect-function --with-tune=generic --with-arch_32=x86-64 --build=x86_64-redhat-linux
  7. Thread model: posix
  8. gcc version 4.8.5 20150623 (Red Hat 4.8.5-44) (GCC)
  9. [root@localhost chapter5]# g++ test2.cpp
  10. In file included from test2.cpp:1:0:
  11. /usr/include/c++/4.8.2/iostream:38:28: fatal error: bits/c++config.h: No such file or directory
  12. #include <bits/c++config.h>
  13.                             ^
  14. compilation terminated.
复制代码
小甲鱼最新课程 -> https://ilovefishc.com
回复

使用道具 举报

发表于 2021-8-9 21:58:50 | 显示全部楼层

这个问题是什么时候出现的?
你 centos 安装的哪个版本?
按照哪个教程安装的?
小甲鱼最新课程 -> https://ilovefishc.com
回复

使用道具 举报

 楼主| 发表于 2021-8-9 22:13:17 | 显示全部楼层
人造人 发表于 2021-8-9 21:58
这个问题是什么时候出现的?
你 centos 安装的哪个版本?
按照哪个教程安装的?

前天发现的吧
centos版本是7.9
  1. [root@localhost chapter5]# cat /etc/redhat-release
  2. CentOS Linux release 7.9.2009 (Core)
复制代码


你帮我安装的

我想干脆换个linux试试了
小甲鱼最新课程 -> https://ilovefishc.com
回复

使用道具 举报

发表于 2021-8-9 22:15:50 | 显示全部楼层
xg-sco 发表于 2021-8-9 22:13
前天发现的吧
centos版本是7.9

先试试能不能不换系统解决这个问题
yum install libgcc.x86_64 libgcc.i686
小甲鱼最新课程 -> https://ilovefishc.com
回复

使用道具 举报

发表于 2021-8-9 22:16:22 | 显示全部楼层
换个 archlinux 玩玩?^_^
小甲鱼最新课程 -> https://ilovefishc.com
回复

使用道具 举报

 楼主| 发表于 2021-8-9 22:17:04 | 显示全部楼层
人造人 发表于 2021-8-9 22:15
先试试能不能不换系统解决这个问题
yum install libgcc.x86_64 libgcc.i686
  1. [root@localhost chapter5]# yum install libgcc.x86_64 libgcc.i686
  2. Loaded plugins: fastestmirror, langpacks
  3. Loading mirror speeds from cached hostfile
  4. * base: mirrors.nju.edu.cn
  5. * extras: mirrors.ustc.edu.cn
  6. * updates: mirrors.ustc.edu.cn
  7. Package libgcc-4.8.5-44.el7.x86_64 already installed and latest version
  8. Package libgcc-4.8.5-44.el7.i686 already installed and latest version
  9. Nothing to do
复制代码
小甲鱼最新课程 -> https://ilovefishc.com
回复

使用道具 举报

发表于 2021-8-9 22:19:05 | 显示全部楼层
  1. find /usr -name 'c++config.h'
复制代码
小甲鱼最新课程 -> https://ilovefishc.com
回复

使用道具 举报

 楼主| 发表于 2021-8-9 22:20:10 | 显示全部楼层
  1. [root@localhost chapter5]# find /usr -name 'c++config.h'
  2. /usr/include/c++/4.8.2/i686-redhat-linux/bits/c++config.h
复制代码
小甲鱼最新课程 -> https://ilovefishc.com
回复

使用道具 举报

 楼主| 发表于 2021-8-9 22:26:27 | 显示全部楼层

这次编译成功了
  1. [root@localhost chapter5]# g++ -I /usr/include/c++/4.8.2/i686-redhat-linux test2.cpp
  2. [root@localhost chapter5]# ./a.out
  3. 12 21
  4. 12
复制代码
小甲鱼最新课程 -> https://ilovefishc.com
回复

使用道具 举报

发表于 2021-8-9 22:28:07 | 显示全部楼层
xg-sco 发表于 2021-8-9 22:26
这次编译成功了

但是奇怪的是,g++ 为什么没有把这个目录添加到默认的搜索路径
我研究研究
小甲鱼最新课程 -> https://ilovefishc.com
回复

使用道具 举报

发表于 2021-8-9 22:34:39 | 显示全部楼层
  1. g++ -v -m32 test2.cpp
  2. g++ -v -m64 test2.cpp

  3. g++ -v -m32 -I /usr/include/c++/4.8.2/i686-redhat-linux test2.cpp
  4. g++ -v -m64 -I /usr/include/c++/4.8.2/i686-redhat-linux test2.cpp
复制代码
小甲鱼最新课程 -> https://ilovefishc.com
回复

使用道具 举报

发表于 2021-8-9 22:40:09 | 显示全部楼层
  1. g++ test2.cpp
  2. file a.out
复制代码
小甲鱼最新课程 -> https://ilovefishc.com
回复

使用道具 举报

 楼主| 发表于 2021-8-9 22:40:59 | 显示全部楼层
  1. [root@localhost chapter5]# g++ -v -m32 test2.cpp
  2. Using built-in specs.
  3. COLLECT_GCC=g++
  4. COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/4.8.5/lto-wrapper
  5. Target: x86_64-redhat-linux
  6. Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-languages=c,c++,objc,obj-c++,java,fortran,ada,go,lto --enable-plugin --enable-initfini-array --disable-libgcj --with-isl=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/isl-install --with-cloog=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/cloog-install --enable-gnu-indirect-function --with-tune=generic --with-arch_32=x86-64 --build=x86_64-redhat-linux
  7. Thread model: posix
  8. gcc version 4.8.5 20150623 (Red Hat 4.8.5-44) (GCC)
  9. COLLECT_GCC_OPTIONS='-v' '-m32' '-shared-libgcc' '-mtune=generic' '-march=x86-64'
  10. /usr/libexec/gcc/x86_64-redhat-linux/4.8.5/cc1plus -quiet -v -imultilib 32 -D_GNU_SOURCE test2.cpp -quiet -dumpbase test2.cpp -m32 -mtune=generic -march=x86-64 -auxbase test2 -version -o /tmp/cckgyUZx.s
  11. GNU C++ (GCC) version 4.8.5 20150623 (Red Hat 4.8.5-44) (x86_64-redhat-linux)
  12.         compiled by GNU C version 4.8.5 20150623 (Red Hat 4.8.5-44), GMP version 6.0.0, MPFR version 3.1.1, MPC version 1.0.1
  13. GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
  14. ignoring nonexistent directory "/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../include/c++/4.8.5/x86_64-redhat-linux/32"
  15. ignoring nonexistent directory "/usr/lib/gcc/x86_64-redhat-linux/4.8.5/include-fixed"
  16. ignoring nonexistent directory "/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../x86_64-redhat-linux/include"
  17. #include "..." search starts here:
  18. #include <...> search starts here:
  19. /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../include/c++/4.8.5
  20. /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../include/c++/4.8.5/backward
  21. /usr/lib/gcc/x86_64-redhat-linux/4.8.5/include
  22. /usr/local/include
  23. /usr/include
  24. End of search list.
  25. GNU C++ (GCC) version 4.8.5 20150623 (Red Hat 4.8.5-44) (x86_64-redhat-linux)
  26.         compiled by GNU C version 4.8.5 20150623 (Red Hat 4.8.5-44), GMP version 6.0.0, MPFR version 3.1.1, MPC version 1.0.1
  27. GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
  28. Compiler executable checksum: 51b2dcccf6085e5bfbbf3932e5685252
  29. In file included from test2.cpp:1:0:
  30. /usr/include/c++/4.8.2/iostream:38:28: fatal error: bits/c++config.h: No such file or directory
  31. #include <bits/c++config.h>
  32.                             ^
  33. compilation terminated.
复制代码
  1. [root@localhost chapter5]# g++ -v -m64 test2.cpp
  2. Using built-in specs.
  3. COLLECT_GCC=g++
  4. COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/4.8.5/lto-wrapper
  5. Target: x86_64-redhat-linux
  6. Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-languages=c,c++,objc,obj-c++,java,fortran,ada,go,lto --enable-plugin --enable-initfini-array --disable-libgcj --with-isl=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/isl-install --with-cloog=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/cloog-install --enable-gnu-indirect-function --with-tune=generic --with-arch_32=x86-64 --build=x86_64-redhat-linux
  7. Thread model: posix
  8. gcc version 4.8.5 20150623 (Red Hat 4.8.5-44) (GCC)
  9. COLLECT_GCC_OPTIONS='-v' '-m64' '-shared-libgcc' '-mtune=generic' '-march=x86-64'
  10. /usr/libexec/gcc/x86_64-redhat-linux/4.8.5/cc1plus -quiet -v -D_GNU_SOURCE test2.cpp -quiet -dumpbase test2.cpp -m64 -mtune=generic -march=x86-64 -auxbase test2 -version -o /tmp/cc5A7nVS.s
  11. GNU C++ (GCC) version 4.8.5 20150623 (Red Hat 4.8.5-44) (x86_64-redhat-linux)
  12.         compiled by GNU C version 4.8.5 20150623 (Red Hat 4.8.5-44), GMP version 6.0.0, MPFR version 3.1.1, MPC version 1.0.1
  13. GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
  14. ignoring nonexistent directory "/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../include/c++/4.8.5/x86_64-redhat-linux"
  15. ignoring nonexistent directory "/usr/lib/gcc/x86_64-redhat-linux/4.8.5/include-fixed"
  16. ignoring nonexistent directory "/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../x86_64-redhat-linux/include"
  17. #include "..." search starts here:
  18. #include <...> search starts here:
  19. /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../include/c++/4.8.5
  20. /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../include/c++/4.8.5/backward
  21. /usr/lib/gcc/x86_64-redhat-linux/4.8.5/include
  22. /usr/local/include
  23. /usr/include
  24. End of search list.
  25. GNU C++ (GCC) version 4.8.5 20150623 (Red Hat 4.8.5-44) (x86_64-redhat-linux)
  26.         compiled by GNU C version 4.8.5 20150623 (Red Hat 4.8.5-44), GMP version 6.0.0, MPFR version 3.1.1, MPC version 1.0.1
  27. GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
  28. Compiler executable checksum: 51b2dcccf6085e5bfbbf3932e5685252
  29. In file included from test2.cpp:1:0:
  30. /usr/include/c++/4.8.2/iostream:38:28: fatal error: bits/c++config.h: No such file or directory
  31. #include <bits/c++config.h>
  32.                             ^
  33. compilation terminated.
复制代码

  1. [root@localhost chapter5]# g++ -v -m32 -I /usr/include/c++/4.8.2/i686-redhat-linux test2.cpp
  2. Using built-in specs.
  3. COLLECT_GCC=g++
  4. COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/4.8.5/lto-wrapper
  5. Target: x86_64-redhat-linux
  6. Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-languages=c,c++,objc,obj-c++,java,fortran,ada,go,lto --enable-plugin --enable-initfini-array --disable-libgcj --with-isl=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/isl-install --with-cloog=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/cloog-install --enable-gnu-indirect-function --with-tune=generic --with-arch_32=x86-64 --build=x86_64-redhat-linux
  7. Thread model: posix
  8. gcc version 4.8.5 20150623 (Red Hat 4.8.5-44) (GCC)
  9. COLLECT_GCC_OPTIONS='-v' '-m32' '-I' '/usr/include/c++/4.8.2/i686-redhat-linux' '-shared-libgcc' '-mtune=generic' '-march=x86-64'
  10. /usr/libexec/gcc/x86_64-redhat-linux/4.8.5/cc1plus -quiet -v -I /usr/include/c++/4.8.2/i686-redhat-linux -imultilib 32 -D_GNU_SOURCE test2.cpp -quiet -dumpbase test2.cpp -m32 -mtune=generic -march=x86-64 -auxbase test2 -version -o /tmp/ccXUNHiO.s
  11. GNU C++ (GCC) version 4.8.5 20150623 (Red Hat 4.8.5-44) (x86_64-redhat-linux)
  12.         compiled by GNU C version 4.8.5 20150623 (Red Hat 4.8.5-44), GMP version 6.0.0, MPFR version 3.1.1, MPC version 1.0.1
  13. GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
  14. ignoring nonexistent directory "/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../include/c++/4.8.5/x86_64-redhat-linux/32"
  15. ignoring nonexistent directory "/usr/lib/gcc/x86_64-redhat-linux/4.8.5/include-fixed"
  16. ignoring nonexistent directory "/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../x86_64-redhat-linux/include"
  17. #include "..." search starts here:
  18. #include <...> search starts here:
  19. /usr/include/c++/4.8.2/i686-redhat-linux
  20. /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../include/c++/4.8.5
  21. /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../include/c++/4.8.5/backward
  22. /usr/lib/gcc/x86_64-redhat-linux/4.8.5/include
  23. /usr/local/include
  24. /usr/include
  25. End of search list.
  26. GNU C++ (GCC) version 4.8.5 20150623 (Red Hat 4.8.5-44) (x86_64-redhat-linux)
  27.         compiled by GNU C version 4.8.5 20150623 (Red Hat 4.8.5-44), GMP version 6.0.0, MPFR version 3.1.1, MPC version 1.0.1
  28. GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
  29. Compiler executable checksum: 51b2dcccf6085e5bfbbf3932e5685252
  30. COLLECT_GCC_OPTIONS='-v' '-m32' '-I' '/usr/include/c++/4.8.2/i686-redhat-linux' '-shared-libgcc' '-mtune=generic' '-march=x86-64'
  31. as -v -I /usr/include/c++/4.8.2/i686-redhat-linux --32 -o /tmp/ccyhkL1z.o /tmp/ccXUNHiO.s
  32. GNU assembler version 2.27 (x86_64-redhat-linux) using BFD version version 2.27-44.base.el7
  33. COMPILER_PATH=/usr/libexec/gcc/x86_64-redhat-linux/4.8.5/:/usr/libexec/gcc/x86_64-redhat-linux/4.8.5/:/usr/libexec/gcc/x86_64-redhat-linux/:/usr/lib/gcc/x86_64-redhat-linux/4.8.5/:/usr/lib/gcc/x86_64-redhat-linux/
  34. LIBRARY_PATH=/usr/lib/gcc/x86_64-redhat-linux/4.8.5/32/:/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib/:/lib/../lib/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-redhat-linux/4.8.5/:/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../:/lib/:/usr/lib/
  35. COLLECT_GCC_OPTIONS='-v' '-m32' '-I' '/usr/include/c++/4.8.2/i686-redhat-linux' '-shared-libgcc' '-mtune=generic' '-march=x86-64'
  36. /usr/libexec/gcc/x86_64-redhat-linux/4.8.5/collect2 --build-id --no-add-needed --eh-frame-hdr --hash-style=gnu -m elf_i386 -dynamic-linker /lib/ld-linux.so.2 /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib/crt1.o /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib/crti.o /usr/lib/gcc/x86_64-redhat-linux/4.8.5/32/crtbegin.o -L/usr/lib/gcc/x86_64-redhat-linux/4.8.5/32 -L/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib -L/lib/../lib -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-redhat-linux/4.8.5 -L/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../.. /tmp/ccyhkL1z.o -lstdc++ -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc /usr/lib/gcc/x86_64-redhat-linux/4.8.5/32/crtend.o /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib/crtn.o
复制代码
  1. [root@localhost chapter5]# g++ -v -m64 -I /usr/include/c++/4.8.2/i686-redhat-linux test2.cpp
  2. Using built-in specs.
  3. COLLECT_GCC=g++
  4. COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/4.8.5/lto-wrapper
  5. Target: x86_64-redhat-linux
  6. Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-languages=c,c++,objc,obj-c++,java,fortran,ada,go,lto --enable-plugin --enable-initfini-array --disable-libgcj --with-isl=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/isl-install --with-cloog=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/cloog-install --enable-gnu-indirect-function --with-tune=generic --with-arch_32=x86-64 --build=x86_64-redhat-linux
  7. Thread model: posix
  8. gcc version 4.8.5 20150623 (Red Hat 4.8.5-44) (GCC)
  9. COLLECT_GCC_OPTIONS='-v' '-m64' '-I' '/usr/include/c++/4.8.2/i686-redhat-linux' '-shared-libgcc' '-mtune=generic' '-march=x86-64'
  10. /usr/libexec/gcc/x86_64-redhat-linux/4.8.5/cc1plus -quiet -v -I /usr/include/c++/4.8.2/i686-redhat-linux -D_GNU_SOURCE test2.cpp -quiet -dumpbase test2.cpp -m64 -mtune=generic -march=x86-64 -auxbase test2 -version -o /tmp/ccC5OaWN.s
  11. GNU C++ (GCC) version 4.8.5 20150623 (Red Hat 4.8.5-44) (x86_64-redhat-linux)
  12.         compiled by GNU C version 4.8.5 20150623 (Red Hat 4.8.5-44), GMP version 6.0.0, MPFR version 3.1.1, MPC version 1.0.1
  13. GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
  14. ignoring nonexistent directory "/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../include/c++/4.8.5/x86_64-redhat-linux"
  15. ignoring nonexistent directory "/usr/lib/gcc/x86_64-redhat-linux/4.8.5/include-fixed"
  16. ignoring nonexistent directory "/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../x86_64-redhat-linux/include"
  17. #include "..." search starts here:
  18. #include <...> search starts here:
  19. /usr/include/c++/4.8.2/i686-redhat-linux
  20. /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../include/c++/4.8.5
  21. /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../include/c++/4.8.5/backward
  22. /usr/lib/gcc/x86_64-redhat-linux/4.8.5/include
  23. /usr/local/include
  24. /usr/include
  25. End of search list.
  26. GNU C++ (GCC) version 4.8.5 20150623 (Red Hat 4.8.5-44) (x86_64-redhat-linux)
  27.         compiled by GNU C version 4.8.5 20150623 (Red Hat 4.8.5-44), GMP version 6.0.0, MPFR version 3.1.1, MPC version 1.0.1
  28. GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
  29. Compiler executable checksum: 51b2dcccf6085e5bfbbf3932e5685252
  30. COLLECT_GCC_OPTIONS='-v' '-m64' '-I' '/usr/include/c++/4.8.2/i686-redhat-linux' '-shared-libgcc' '-mtune=generic' '-march=x86-64'
  31. as -v -I /usr/include/c++/4.8.2/i686-redhat-linux --64 -o /tmp/cc7osJX9.o /tmp/ccC5OaWN.s
  32. GNU assembler version 2.27 (x86_64-redhat-linux) using BFD version version 2.27-44.base.el7
  33. COMPILER_PATH=/usr/libexec/gcc/x86_64-redhat-linux/4.8.5/:/usr/libexec/gcc/x86_64-redhat-linux/4.8.5/:/usr/libexec/gcc/x86_64-redhat-linux/:/usr/lib/gcc/x86_64-redhat-linux/4.8.5/:/usr/lib/gcc/x86_64-redhat-linux/
  34. LIBRARY_PATH=/usr/lib/gcc/x86_64-redhat-linux/4.8.5/:/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/:/lib/../lib64/:/usr/lib/../lib64/:/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../:/lib/:/usr/lib/
  35. COLLECT_GCC_OPTIONS='-v' '-m64' '-I' '/usr/include/c++/4.8.2/i686-redhat-linux' '-shared-libgcc' '-mtune=generic' '-march=x86-64'
  36. /usr/libexec/gcc/x86_64-redhat-linux/4.8.5/collect2 --build-id --no-add-needed --eh-frame-hdr --hash-style=gnu -m elf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2 /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/crt1.o /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/crti.o /usr/lib/gcc/x86_64-redhat-linux/4.8.5/crtbegin.o -L/usr/lib/gcc/x86_64-redhat-linux/4.8.5 -L/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../.. /tmp/cc7osJX9.o -lstdc++ -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc /usr/lib/gcc/x86_64-redhat-linux/4.8.5/crtend.o /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/crtn.o
复制代码
小甲鱼最新课程 -> https://ilovefishc.com
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|手机版|Archiver|鱼C工作室 ( 粤ICP备18085999号-1 | 粤公网安备 44051102000585号)

GMT+8, 2025-4-26 22:40

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表