nodejs / nodejs/node-gyp

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

Open
#3,107 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
10.7k
Forks
1.9k
Avg merge
1d 4h
Merged PRs (30d)
5

Description

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"
]
}
},

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the reported binding.gyp settings and reproduce the C2429 failure on the affected Windows/MSVC setup. Check whether /std:c++17 is reaching the compiler rather than only the linker; done means a minimal native addon build completes without the language-feature error.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, node.js
Domain
build-system, devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.