升级到Mojave后,Pybind11不起作用或C ++无法编译:-lstdc ++未找到 [英] Pybind11 doesn't work or C++ doesn't compile after upgrading to Mojave: -lstdc++ not found

查看:95
本文介绍了升级到Mojave后,Pybind11不起作用或C ++无法编译:-lstdc ++未找到的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I was able to install the pybind11 example here before I upgraded my MacOS. However, after I upgraded my MacOS to Mojave, when I compile the same example on that link, I see the following error:

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

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

Am I missing a linker command? I've searched online but couldn't find a solution.

推荐答案

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

I actually found the answer. I only needed to do

export MACOSX_DEPLOYMENT_TARGET=10.9

安装顺利.

这篇关于升级到Mojave后,Pybind11不起作用或C ++无法编译:-lstdc ++未找到的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆