Skip to content

Commit 11e0ffc

Browse files
authored
Add the gcc command to check include paths to the FAQ
1 parent 68b8965 commit 11e0ffc

File tree

1 file changed

+6
-0
lines changed
  • Documentation/LanguageServer

1 file changed

+6
-0
lines changed

Documentation/LanguageServer/FAQ.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
[How do I get IntelliSense to work correctly](#how-do-i-get-intellisense-to-work-correctly)?
44

5+
[Why do I see red squiggles under Standard Library types](#why-do-i-see-red-squiggles-under-standard-library-types)?
6+
57
[How do I get the new IntelliSense to work with MinGW on Windows](#how-do-i-get-the-new-intellisense-to-work-with-mingw-on-windows)?
68

79
[What is the difference between "includePath" and "browse.path" in c\_cpp\_properties.json](#what-is-the-difference-between-includepath-and-browsepath-in-c_cpp_propertiesjson)?
@@ -27,6 +29,10 @@ Add the necessary paths to your include files to the `"includePath"` array. The
2729

2830
If you want IntelliSense to operate on your files even when all #include directives do not resolve, then you can choose the `Force semantic IntelliSense` code action to always use the new IntelliSense engine. You can also set the `C_Cpp.intelliSenseEngineFallback` setting to `"Disabled"`.
2931

32+
## Why do I see red squiggles under Standard Library types?
33+
34+
The most common reason for this is missing or sorted include paths. If you are using a compiler in the GCC family, the system includes that you add to your `"includePath"` in **c_cpp_properties.json** should match the output of the following command: `gcc -Wp,-v -E -xc -x c++ /dev/null` (replace 'gcc' with whichever compiler you are using). GCC and its relatives require the paths to be in a specific order too, so sorting the paths for aesthetics will likely result in incorrect IntelliSense results.
35+
3036
## How do I get the new IntelliSense to work with MinGW on Windows?
3137

3238
Since MinGW is a relative of GCC, Microsoft mode compilation (which is the default on Windows) doesn't work very well with it. To use GCC/CLang mode, set the `"intelliSenseMode"` property in your **c_cpp_properties.json** file to `"clang-x64"`. An example **c_cpp_properties.json** [is shared here for your convenience](https://github.com/Microsoft/vscode-cpptools/blob/master/Documentation/LanguageServer/MinGW.md).

0 commit comments

Comments
 (0)