Add a FAQ for getting IntelliSense to work with MinGW on Windows

This commit is contained in:
Bob Brown 2017-05-23 08:48:01 -07:00
Родитель 6df6c118e5
Коммит 3adb8cb70b
1 изменённых файлов: 8 добавлений и 0 удалений

Просмотреть файл

@ -2,6 +2,8 @@
[Why do I have red underlines everywhere after updating to the latest version](#why-do-i-have-red-underlines-everywhere-after-updating-to-the-latest-version)?
[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)?
[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)?
## Why do I have red underlines everywhere after updating to the latest version?
@ -26,6 +28,12 @@ If you want to keep using the semantic-aware features that will be coming online
If you were happy with the old behavior of the extension or want to wait to get the semantic-aware features until build system support arrives in the extension so that you don't have to manually configure a c_cpp_properties.json file, you can disable the new IntelliSense engine entirely by adding `"intelliSenseEngine": "Tag Parser"` to your settings.json file.
## How do I get the new IntelliSense to work with MinGW on Windows?
On Windows PCs, the new IntelliSense engine is configured to compile your source files in Microsoft mode. But since MinGW is a relative of GCC, Microsoft mode compilation doesn't work very well with it. While the IntelliSense engine supports compiling code in clang/gcc mode, the extension does not currently expose any settings that allow you to configure it.
You can, however, override the engine's configuration by changing the contents of the `%userprofile%\.vscode\extensions\ms-vscode.cpptools-0.11.1\bin\msvc.64.intel.json` file. In fact, copying `msvc.64.linux.json` over `msvc.64.intel.json` will reconfigure the engine to compile your source code in clang mode. The caveat is that making changes to the `msvc.64.intel.json` is not a permanent operation. The next time you upgrade the extension, your changes will be reverted. However, this workaround should be able to enable you to use the new IntelliSense engine with MinGW until we have time to expose a proper setting.
## What is the difference between "includePath" and "browse.path" in c\_cpp\_properties.json?
Starting with version 0.11.0 of the cpptools extension, there are now two settings in the c\_cpp\_properties.json file. They are used by the different IntelliSense engines that we support and have slightly different meanings for the components that use them.