首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >找不到-lasan和libasan_preinit.o

找不到-lasan和libasan_preinit.o
EN

Stack Overflow用户
提问于 2016-07-04 11:03:54
回答 0查看 6.8K关注 0票数 2

当我使用-fsanitize=address将一些对象链接成二进制文件时,g++说标题中的两个库并不存在。

我的g++版本是:

代码语言:javascript
复制
    $ /opt/rh/devtoolset-2/root/usr/bin/g++ -v
    Using built-in specs.
    COLLECT_GCC=/opt/rh/devtoolset-2/root/usr/bin/g++
    COLLECT_LTO_WRAPPER=/opt/rh/devtoolset-2/root/usr/libexec/gcc/x86_64-redhat-linux/4.8.2/lto-wrapper
    Target: x86_64-redhat-linux
    Configured with: ../configure --prefix=/opt/rh/devtoolset-2/root/usr --mandir=/opt/rh/devtoolset-2/root/usr/share/man --infodir=/opt/rh/devtoolset-2/root/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 --enable-languages=c,c++,fortran,lto --enable-plugin --with-linker-hash-style=gnu --enable-initfini-array --disable-libgcj --with-isl=/builddir/build/BUILD/gcc-4.8.2-20140120/obj-x86_64-redhat-linux/isl-install --with-cloog=/builddir/build/BUILD/gcc-4.8.2-20140120/obj-x86_64-redhat-linux/cloog-install --with-mpc=/builddir/build/BUILD/gcc-4.8.2-20140120/obj-x86_64-redhat-linux/mpc-install --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux
    Thread model: posix
    gcc version 4.8.2 20140120 (Red Hat 4.8.2-15) (GCC)

如果我使用g++,我需要手动编译libasan吗?

EN

回答

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

https://stackoverflow.com/questions/38176407

复制
相关文章

相似问题

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