首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >devtoolset-6使用的是系统libstdc++,无法链接

devtoolset-6使用的是系统libstdc++,无法链接
EN

Stack Overflow用户
提问于 2018-06-06 05:38:28
回答 1查看 4.3K关注 0票数 8

我有一个用gcc6编译的第三方库,我需要链接到它。因此,我已经卸载了标准GCC软件包,并安装了软件集合开发工具集-6包(Centos 7.4)

代码语言:javascript
复制
$ g++ -v

Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/opt/rh/devtoolset-6/root/usr/libexec/gcc/x86_64-redhat-linux/6.3.1/lto-wrapper
Target: x86_64-redhat-linux
Configured with: ../configure --enable-bootstrap --enable-languages=c,c++,fortran,lto --prefix=/opt/rh/devtoolset-6/root/usr --mandir=/opt/rh/devtoolset-6/root/usr/share/man --infodir=/opt/rh/devtoolset-6/root/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --enable-plugin --with-linker-hash-style=gnu --enable-initfini-array --disable-libgcj --with-default-libstdcxx-abi=gcc4-compatible --with-isl=/builddir/build/BUILD/gcc-6.3.1-20170216/obj-x86_64-redhat-linux/isl-install --enable-libmpx --enable-gnu-indirect-function --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux
Thread model: posix
gcc version 6.3.1 20170216 (Red Hat 6.3.1-3) (GCC)

但是,我得到了许多类似于以下内容的链接错误:

代码语言:javascript
复制
libcomsd.so: undefined reference to `operator delete[](void*, unsigned long)@CXXABI_1.3.9'

这似乎是因为devtoolset没有附带与新编译器一起编译的libstd++版本,因此链接器正在查找与gcc4编译的/usr/lib64 64中的标准链接器,因此与使用gcc6编译的libcomsd不兼容。

有什么办法让我把这一切做好吗?用libstd++编译的一些gcc6软件包?

EN

回答 1

Stack Overflow用户

发布于 2021-04-20 04:15:09

devtoolset-9解决了缺少动态so library的问题.

绝对路径是以下路径:

/opt/rh/devtoolset-9/root/usr/lib/gcc/x86_64-redhat-linux/9/libstdc++.so

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/50712896

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档