Node-gyp: Enable C++11 support

Created on 14 Jul 2013  路  5Comments  路  Source: nodejs/node-gyp

Hello,

is it possible to enable C++11 support (using clang on OS X with node 0.10.13) or does this conflict with the native node add ons ?

Best,
Bodo

Most helpful comment

what errors?
under debian i had to set the following:

# enable rtti for dynamic_cast
    'cflags_cc!': [ '-fno-rtti' ] 

All 5 comments

sure, just set the compiler flag. under debian it works fine

"cflags": [
  "-std=c++11",
  "-stdlib=libc++"
]

Doesn't work on OS X, the build throws syntax errors when it hits a C++ lambda

what errors?
under debian i had to set the following:

# enable rtti for dynamic_cast
    'cflags_cc!': [ '-fno-rtti' ] 

Yep, xcode_settings works.

Was this page helpful?
0 / 5 - 0 ratings