Reputation: 41
I am doing flutter devlopement and in that there are some modules of c++. These were the automatically generated files of c++. When i open the project in vscode it shows this message in output. I have installed c++ compiler mingw64 and included path in the environment variables.
I tried changing configurations of c++ intellisense. As per this.. #include errors detected. Please update your includePath in visual studio code
Upvotes: 3
Views: 47302
Reputation: 1
I had the same problem. here is how you fix it.
Now your good to go.
Upvotes: 0
Reputation: 1
press ctrl+shift+p then search c_cpp_properties.json while adding the path to this file make sure that address has to '2 back slash' instead of 'one back slash'
{
"configurations": [
{
"name": "arm",
"includePath": [
"${workspaceFolder}/**"
],
"defines": [
"_DEBUG",
"UNICODE",
"_UNICODE"
],
"windowsSdkVersion": "10.0.22621.0",
"cStandard": "c99",
"intelliSenseMode": "linux-gcc-arm",
"compilerPath": "C:\MinGW\bin\gcc.exe"
}
],
"version": 4
your file may not have compiler path section so make it
Upvotes: 0
Reputation: 2327
I had a similar issue with a different compiler and this helped me to solve my issue: configure intellisense crosscompilation
this is my c_cpp_properties.json
{
"configurations": [
{
"name": "arm",
"includePath": [
"${workspaceFolder}/**"
],
"defines": [
"_DEBUG",
"UNICODE",
"_UNICODE"
],
"windowsSdkVersion": "10.0.22621.0",
"cStandard": "c99",
"intelliSenseMode": "linux-gcc-arm",
"compilerPath": "C:\\arm_toolchain\\13.2.Rel1-mingw-w64-i686-arm-none-eabi\\bin\\arm-none-eabi-gcc.exe"
}
],
"version": 4
}
Upvotes: 0
Reputation: 31
I had a similar issue, but with a different compiler (ti-cgt-arm) and I ended up setting
"compilerPath": ""
in the corresponding configuration in c_cpp_properties.json
and then added all necessary entries in "includePath":
(to fix the intellisense errors for #include
s). I found the hints in the VS Code CPP documentation:
compilerPath (optional) The full path to the compiler you use to build your project, for example /usr/bin/gcc, to enable more accurate IntelliSense. The extension will query the compiler to determine the system include paths and default defines to use for IntelliSense.
Putting "compilerPath": "" (empty string) will skip querying a compiler. This is useful if a specified compiler doesn't support the arguments that are used for the query, as the extension will default back to any compiler it can find (like Visual C). Leaving out the compilerPath property does not skip the query.
Apparently, when the compiler doesn't respond to VS Code as it expects (because the compiler doesn't support the arguments passed by VS Code), VS Code decides to use a fallback compiler.
Upvotes: 1