I'm trying to make a C++ library to a node.js add-on.
Problem is on build time it errors like:
error: no member named 'runtime_error' in namespace 'std' throw std::runtime_error
Is there something I can replace runtime_error with to get rid of this errors? 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.
What I've done in some of my addons (e.g. sipster) was just add the flag instead of trying to negate it:
'cflags_cc': [ '-fexceptions' ],
That works for me with at least node v0.10.x.
You can add
'GCC_ENABLE_CPP_EXCEPTIONS': 'YES',
to your xcode_settings, that did it for me.
Hope it helps.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With