CentOS /usr/bin/ld: cannot find -lstdc++

来源:互联网 发布:小幽灵网络技术论坛 编辑:程序博客网 时间:2024/05/22 10:57

解决CentOS 7 中,make源文件时出现 /usr/bin/ld: cannot find -lstdc++ 错误

工具/原料

  • CentOS 7
  • gcc 4.8

方法/步骤

  1. 1. 问题如图所示

    CentOS /usr/bin/ld: cannot find -lstdc++


  2. 2. 解决问题

    在CentOS 7中,使用static方法编译,需要安装static version of glibc-static libstdc++-static。使用如下命令安装

    yum install glibc-static libstdc++-static

    CentOS /usr/bin/ld: cannot find -lstdc++





  3. 3. 安装完成后,成功编译源码,如图所示

    CentOS /usr/bin/ld: cannot find -lstdc++

阅读全文
0 0
原创粉丝点击