undefined reference to `__asan_report_load8'问题

小鸟向前飞 2017-11-02 09:53:20
在ubuntu上写c++,gcc和g++版本都是4.8.4。
编译的时候出现这个提示:


1> ~/workspace/fileservicemanager/bin/x64/Debug/liblog4cplus-1.2.so.5.1.6: undefined reference to `__asan_report_load8'
1> ~/workspace/fileservicemanager/bin/x64/Debug/liblog4cplus-1.2.so.5.1.6: undefined reference to `__asan_report_store2'
1> ~/workspace/fileservicemanager/bin/x64/Debug/liblog4cplus-1.2.so.5.1.6: undefined reference to `__asan_report_load4'
1> ~/workspace/fileservicemanager/bin/x64/Debug/liblog4cplus-1.2.so.5.1.6: undefined reference to `__asan_handle_no_return'
1> ~/workspace/fileservicemanager/bin/x64/Debug/liblog4cplus-1.2.so.5.1.6: undefined reference to `__asan_report_load16'
1> ~/workspace/fileservicemanager/bin/x64/Debug/liblog4cplus-1.2.so.5.1.6: undefined reference to `__asan_init_v1'
1> ~/workspace/fileservicemanager/bin/x64/Debug/liblog4cplus-1.2.so.5.1.6:/home/zhaokt/workspace/fileservicemanager/bin/x64/Debug/liblog4cplus-1.2.so.5.1.6: undefined reference to `__asan_report_load8'
1> ~/workspace/fileservicemanager/bin/x64/Debug/liblog4cplus-1.2.so.5.1.6: undefined reference to `__asan_report_store2'
1> ~/workspace/fileservicemanager/bin/x64/Debug/liblog4cplus-1.2.so.5.1.6: undefined reference to `__asan_report_load4'
1> ~/workspace/fileservicemanager/bin/x64/Debug/liblog4cplus-1.2.so.5.1.6: undefined reference to `__asan_handle_no_return'
1> ~/workspace/fileservicemanager/bin/x64/Debug/liblog4cplus-1.2.so.5.1.6: undefined reference to `__asan_report_load16'
1> ~/workspace/fileservicemanager/bin/x64/Debug/liblog4cplus-1.2.so.5.1.6: undefined reference to `__asan_init_v1'
1> ~/workspace/fileservicemanager/bin/x64/Debug/liblog4cplus-1.2.so.5.1.6: undefined reference to `__asan_report_store4'
1> ~/workspace/fileservicemanager/bin/x64/Debug/liblog4cplus-1.2.so.5.1.6: undefined reference to `__asan_report_load2'
1> ~/workspace/fileservicemanager/bin/x64/Debug/liblog4cplus-1.2.so.5.1.6: undefined reference to `__asan_report_store8'


链接命令:


g++ -o "~/workspace/fileservicemanager/fileservicemanager/../bin/x64/Debug/fileservicemanager" -Wl,--no-undefined -Wl,-z,relro -Wl,-z,now -Wl,-z,noexecstack -ldl -pthread ~/workspace/fileservicemanager/fileservicemanager/obj/x64/Debug/main.o ~/workspace/fileservicemanager/bin/x64/Debug/libnetwork.so ~/workspace/fileservicemanager/bin/x64/Debug/liblog4cplus-1.2.so.5.1.6



在网上没找到好的解决方案,不知道该怎么解决。
...全文
3238 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
赵4老师 2017-11-02
  • 打赏
  • 举报
回复
少-l这些函数实现所在的.so
小鸟向前飞 2017-11-02
  • 打赏
  • 举报
回复
解决了 是链接的so和一个a重复了,so中也链接了这个a。
小鸟向前飞 2017-11-02
  • 打赏
  • 举报
回复
引用 1 楼 zhao4zhong1 的回复:
少-l这些函数实现所在的.so
编译的另一个so的链接配置是一样的 没有出这个问题

33,311

社区成员

发帖
与我相关
我的任务
社区描述
C/C++ 新手乐园
社区管理员
  • 新手乐园社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧