node.js - Compiling native node addon with c++ 17 inside fails during npm install on ubuntu -


i have native add-on nodejs uses c++17 features, "shared_mutex". when call npm install downloads , compiles add-on error: enter image description here

the linux machine has gcc 6.0 installed.

my binding.gyp uses following config catch os type , add flags accordingly:

     'conditions': [         ['os=="linux"', {             'cxxflags': [                 '-std=c++1z'             ]}], 

** i've tried '-std=c++17', '-std=c++1z'.

what missing?

update: 1. updated ubuntu 16.04 gcc 16.04 , made default. 2. seems when try compile manualy using node-gyp rebuild "cxxflags='-std=c++17'" works , brings 1 error: "shared_,utex in namespace std not name type std::shared_mutex file mutex" (the last error)

problem solved. has same issue, bind.gyp should use cflags_cc instead of cxxflags.


Comments

Popular posts from this blog

python Tkinter Capturing keyboard events save as one single string -

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

javascript - Z-index in d3.js -