Closed matteodisabatino closed 2 years ago
It means that your compiler is outdated (or, rather, the C++ standard library headers are, but usually their versions are tied to compiler versions).
Hi, thanks for your answer. I updated to macOS Monterey few days ago and I installed the latest Xcode Command Line Tools, so I don't know how it could be possibile.
Here my clang version:
Apple clang version 13.0.0 (clang-1300.0.29.3)
Target: x86_64-apple-darwin21.1.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
Maybe the option -std=c++14
needs to be passed to clang?
See https://github.com/nodejs/node/issues/38367
You gotta reason: with flag -std=c++14
my problem has been solved. Thanks you so much.
@fivdi I've made some tests and I've seen that with these simple settings:
"conditions": [
["OS=='mac'", {
"xcode_settings": {
"MACOSX_DEPLOYMENT_TARGET": "10.9"
}
}]
]
Compilation works fine and there is no need to specify this:
"conditions": [
["OS=='mac'", {
"xcode_settings": {
"OTHER_CFLAGS": [
"-std=c++14"
]
}
}]
]
I don't know if it could be useful.
I think I'd prefer "MACOSX_DEPLOYMENT_TARGET": "10.9"
over "OTHER_CFLAGS": ["-std=c++14"]
. serialport also does it that way, see here.
Happy to hear. I agree.
Got this error while compiling using prebuild. Here all the stack: