I have native add-on for nodejs that uses c++17 features, specifically "shared_mutex". When I call npm install which downloads and compiles the add-on i get an error:
The linux machine has GCC 6.0 installed.
My Binding.gyp uses the following config to catch os type and add flags accordingly:’conditions’: [
** i’ve also tried with ‘-std=c++17’, ‘-std=c++1z’.
What am I missing?
Update: 1. Updated ubuntu 16.04 to GCC 16.04 and made it default. 2. It seems that when i try to compile it manualy using node-gyp rebuild "CXXFLAGS=’-std=c++17’" it works and brings only one error: "shared_,utex in namespace std does not name a type std::shared_mutex file mutex" (the last error)