ubutun上编译出现undefined reference to symbol ‘dladdr@@GLIBC

编程入门 行业动态 更新时间:2024-10-18 16:50:33

ubutun上编译出现undefined <a href=https://www.elefans.com/category/jswz/34/1764760.html style=reference to symbol ‘dladdr@@GLIBC"/>

ubutun上编译出现undefined reference to symbol ‘dladdr@@GLIBC

作者:朱金灿
来源:clever101的专栏

为什么大多数人学不会人工智能编程?>>>

  ubutun上编译一段C++程序,出现错误:
/usr/bin/ld: /tmp/ccghh3FJ.o: undefined reference to symbol ‘dladdr@@GLIBC_2.2.5’
//lib/x86_64-linux-gnu/libdl.so.2: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status。
  一查,原来是没有链接dl库,解决办法是在编译命令中添加-ldl即可。

更多推荐

ubutun上编译出现undefined reference to symbol ‘dladdr@@GLIBC

本文发布于:2023-11-15 01:52:36,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1591614.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:reference   undefined   ubutun   GLIBC   dladdr

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!