Open f-and opened 1 year ago
Same error here in macosx 14 with no workaround. Any ideas ?
This library relies heavily on constructors, and other gcc
specific features, so:
gcc
compiler:// settings.json
{
"C_Cpp.errorSquiggles": "disabled"
}
// tasks.json
{
"version": "2.0.0",
"tasks": [
{
"label": "build",
"command": "make all", // or the command you use to build the project
"type": "shell",
"group": {
"kind": "build",
"isDefault": true
},
"problemMatcher": ["$gcc"]
}
]
}
In MacOS, gcc is just an alias for clang compiler, which doesn't support nested functions. As far as I know1, you can install GCC compiler using Homebrew, but I don't have a MacOS to confirm that
Yes, you can. But you have to include manually /usr/local/lib and /usr/local/include paths to work with homebrew's gcc. Thanks @RaniAgus
Error
Upon clean install of cspec, following the explanation in the README.md file, and including the required header files for the example file copied from the previous file, Visual Studio Code (with C/C++ extensions installed) detects the error:
argument of type "void" is incompatible with parameter of type "Runnable"C/C++(167)
Though this error is only aesthetic, as the file compiles correctly and the tests run as expected.
Steps to reproduce it
Things attempted to fix the error:
__describe("Hello world", ({ void __$__()
) into the file.Attached a screenshot of the error in question, the second error comes from not detecting the first one as a correct structure, so it doesn't matter for the initial issue.