Unable to Resolve Configuration with compilerPath "/Usr/Bin/Gcc". Using "Cl. Exe" Instead

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

2

1 Answer

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 #includes). 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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Chloe Bennett

Chloe Bennett

Culture, Media & Entertainment Columnist

Chloe Bennett explores the intersection of pop culture, streaming entertainment, digital trends, and contemporary lifestyle. Her weekly commentary reaches thousands of culture enthusiasts.

Share this article
Twitter Facebook Pinterest