'#include errors detected. Please update your includePath. Squiggles are disabled for this translation unit

while editing a file of mine called "mmap.c" in VSCode using the C/C++ extension I noticed that all the lines tagged "#include" had red lines with the following message error when I hovered over the top most "#include":

#include errors detected. Please update your includePath. Squiggles are disabled for this translation unit (C:\Users\MyName\Documents\OS\mmap.c).

I then clicked on "Quick Fix" and the first option I that popped up was "Edit 'IncludePath'setting.". I then selected that and it brought me to the "C/C++ Configurations" tab. On that tab right over the section "Compiler Path" it states that my compiler path is /usr/bin/gcc however right below it there's a red box that says as follows: Cannot find: C:\Users\MyName\AppData\Local\Packages\CanonicalGroupLimited.Ubuntu20.04onWindows_79rhkp1fndgsc\LocalState\rootfs\usr/bin/gcc

I can also click on the c_cpp_properties.json file given by the C/C++ extension scrolling down we find the "CompilerPath" section which states "CompilerPath:'/usr/bin/gcc'," and is underlined by a warning yellow line stating the above mentioned "Cannot find: "

Does anyone know what's causing this error and how I can fix my compiler path so I don't keep getting #include errors in my file?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source