You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I recently dropped support for platforms other than Windows for a native module and now I get the following error building the solution on Visual Studio.
Exception support not detected. Define either NAPI_CPP_EXCEPTIONS or NAPI_DISABLE_CPP_EXCEPTIONS.
Running node-gyp rebuild from the command line works perfectly with no warnings.
I attach an example of my binding.gyp
{
'includes': [],
'targets': [
{
'target_name': 'addon',
'configurations': {
'Release': { # Gyp is very picky about where this node lives within a target
'msvs_settings': {
'VCCLCompilerTool': {
'FavorSizeOrSpeed': 2, # Favor size over speed
'Optimization': 1, # Optimize for size
'RuntimeLibrary': 2, # Multi-threaded runtime dll,
'ExceptionHandling': 1, # Yes please
},
'VCLinkerTool': {
'AdditionalOptions': [
'/NODEFAULTLIB:mincore.lib',
]
}
}
},
},
'sources': [
'src/main.cpp',
],
'defines': [
'NOMINMAX',
'UNICODE',
'WIN32_LEAN_AND_MEAN',
'_WIN32_WINNT=0x0603',
'_HAS_EXCEPTIONS=1',
],
'include_dirs': [
'<!@(node -p "require(\'node-addon-api\').include")',
]
}
]
}
The text was updated successfully, but these errors were encountered:
Hello there,
I recently dropped support for platforms other than Windows for a native module and now I get the following error building the solution on Visual Studio.
Exception support not detected. Define either NAPI_CPP_EXCEPTIONS or NAPI_DISABLE_CPP_EXCEPTIONS.
Running node-gyp rebuild from the command line works perfectly with no warnings.
I attach an example of my binding.gyp
The text was updated successfully, but these errors were encountered: