[英]Node.js Add-on with GYP “exceptions”
I'm trying to make a C++ library to a node.js add-on. 我正在尝试为node.js附加组件创建C ++库。
Problem is on build time it errors like: 问题在于构建时间,它出现以下错误:
error: no member named 'runtime_error' in namespace 'std' throw std::runtime_error 错误:名称空间“ std”中没有名为“ runtime_error”的成员抛出std :: runtime_error
Is there something I can replace runtime_error with to get rid of this errors? 有什么我可以代替runtime_error摆脱这个错误的吗? I tried to disable it with: 我尝试通过以下方式禁用它:
'cflags!': [ '-fno-exceptions' ],
'cflags_cc!': [ '-fno-exceptions' ],
But no luck 但是没有运气
I found this discussion . 我找到了这个讨论 。 And it seems like I have the same question as the guy at the bottom but he didn't get any answer. 似乎我和最底层的人有相同的问题,但他没有得到任何答案。
You can add 你可以加
'GCC_ENABLE_CPP_EXCEPTIONS': 'YES',
to your xcode_settings, that did it for me. 到您的xcode_settings,为我做到了。
Hope it helps. 希望能帮助到你。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.