-
Notifications
You must be signed in to change notification settings - Fork 2
Use correct msvs language standard format #14
Conversation
Note the `/` instead of `-` in `/std:c++17`.
Thanks for the suggestion. The CI fails for your PR because I deleted my fork of the superstring library from npm. I think you're confusing two options, ['OS == "win"', {
"msvs_settings": {
"VCCLCompilerTool": {
"AdditionalOptions": ["-std:c++17"],
},
},
}] then there's a suggestion to use a completely different option (notice all 3 key names starting with ['OS == "win"', {
"msbuild_settings": {
"ClCompile": {
"LanguageStandard": "stdcpp17"
}
}
}] then a third suggestion suggests changing ['OS == "win"', {
"msvs_settings": {
"VCCLCompilerTool": {
"AdditionalOptions": ["/std:c++17"]
}
}
}] I tried all 3 suggestions already actually, both the first and the third and they didn't work so I tried the second and committed that and that's the state of the repo you found when in this PR you made a 4th suggestion, suggesting to change the syntax of the second suggestion, the one that uses a completely different option to ['OS == "win"', {
"msbuild_settings": {
"ClCompile": {
"LanguageStandard": "/std:c++17"
}
}
}] and that of course fails with
https://github.com/curlconverter/node-tree-sitter/actions/runs/4461129448/jobs/7834740582 I have repeated the experiment with the 3rd suggestion (which is what I think you intended to suggest): 3rd suggestion: ceac04a the 2nd suggestion: 0f9007f and a run with no Windows-specific option at all: 3764003 First off, note that there's two CI jobs, the first does
on Node 14, 16 and 18. Additionally, on Node 14 we manually update node-gyp as suggested in this issue and it's the only Node version of the 3 that works, regardless of what's in binding.gyp, but those manual node-gyp update instructions don't work for Node 16 or 18. and the second job does
on Ubuntu, macOS and Windows. I have no idea why It's actually able to prebuild for all Node target versions and Electron target versions 11 and 12 and then it fails on 13. Neither suggestion 2 or 3 have any effect, we get the same result and error message when it's compiling win_delay_load_hook.cc
which https://stackoverflow.com/questions/14148933/libcmt-conflicts-with-use-of-other-libs-unresolved-external-symbols says happens when
Is nodejs/node-gyp#1686 (comment) relevant here? |
Ah yes, I meant approach 3. Odd, that's what we use and we're able to compile for Electron 21. We don't build prebuilts for Electron versions that are EOL so can't help with Electron 13. We default to C++17 on Node 18+/Electron 20+ otherwise default to C++14, might be worth trying? https://github.com/nodegit/electron-npg-automator/actions/runs/4147287749/jobs/7173994146 |
I tried limiting it to only non-EOL Electron versions and still got the same error: https://github.com/curlconverter/node-tree-sitter/actions/runs/4462402443/jobs/7836911199?pr=15 |
Looks like you're using a fork of |
That shouldn't affect this issue, that's just changing how nan accesses internal v8 fields to not conflict with cppgc. I'm out of ideas, sorry :/ |
Alright, thanks for your help. I personally don't care about Windows+Electron, my library can't even be used on Electron anyway because I used top-level |
Give this a shot. Note the
/
instead of-
in/std:c++17
.https://github.com/verhovsky/node-tree-sitter/blob/c02fbb635a3b53969997ac56f8ac8144bf2250c6/binding.gyp#L32