gpt4 book ai didi

c++ - 升级到 Mojave : -lstdc++ not found 后 Pybind11 不工作或 C++ 不编译

转载 作者:行者123 更新时间:2023-11-30 03:19:56 25 4
gpt4 key购买 nike

我能够安装 pybind11 示例 here在我升级我的 MacOS 之前。但是,在我将我的 MacOS 升级到 Mojave 之后,当我在该链接上编译相同的示例时,我看到以下错误:

clang: warning: libstdc++ is deprecated; move to libc++ with a minimum deployment target of OS X 10.9 [-Wdeprecated]
ld: library not found for -lstdc++
clang: error: linker command failed with exit code 1 (use -v to see invocation)
error: command 'g++' failed with exit status 1

我是否缺少链接器命令?我在网上搜索过,但找不到解决方案。

最佳答案

我实际上找到了答案。我只需要做

export MACOSX_DEPLOYMENT_TARGET=10.9

安装顺利。

关于c++ - 升级到 Mojave : -lstdc++ not found 后 Pybind11 不工作或 C++ 不编译,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53287975/

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