gpt4 book ai didi

c++ - 海湾合作委员会错误 "/usr/bin/ld: cannot find -lstdc++"

转载 作者:塔克拉玛干 更新时间:2023-11-03 00:50:42 26 4
gpt4 key购买 nike

我在 64 位系统上有 32 位库,所以在使用 32 位库编译我的代码时,我通过了 -m32 但这会导致另一个错误提示

/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.8/libstdc++.so when searching for -lstdc++

/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.8/libstdc++.a when searching for -lstdc++

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

collect2: error: ld returned 1 exit status

如何解决?

最佳答案

如果知道32位库的安装位置,可以在-lstdc++前加上-L/path/to/library/directory

关于c++ - 海湾合作委员会错误 "/usr/bin/ld: cannot find -lstdc++",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31760581/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com