node-gyp icon indicating copy to clipboard operation
node-gyp copied to clipboard

error C2429: 语言功能 "嵌套命名空间定 义" 需要编译器标志"/std:c++17"

Open BFjacky opened this issue 11 months ago • 2 comments

When I build program. It throw errors cause of c++ version. But I already set config in "binding.gyp". It still throw that error. How to solve this problem !!

binding.gyp "cflags_cc": [ "/std=c++17" ], "msvs_settings": { "VCLinkerTool": { "AdditionalOptions": [ "/std:c++17" ] } },

BFjacky avatar Dec 06 '24 06:12 BFjacky

  • https://github.com/nodejs/node-gyp/issues/1662#issuecomment-2522234566

cclauss avatar Dec 06 '24 07:12 cclauss

If one answer solution doesn't work, try another one mentioned. Sometimes ClCompile, sometimes VCCLCompilerTool

Akarinnnnn avatar Dec 16 '24 07:12 Akarinnnnn