You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Documentation/Getting started.md
+6-5Lines changed: 6 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,21 +2,21 @@
2
2
3
3
This page describes how to configure include paths for folders containing C or C++ files to get the full IntelliSense experience. If you're seeing the following message when opening a folder in VS Code, it means the C++ IntelliSense engine needs additional information about the paths in which your symbols are located.
4
4
5
-

5
+

6
6
7
-
## Where to configure the include paths
7
+
## How to configure the include paths
8
8
9
9
When you open a folder, the extension will attempt to locate your system headers based on your operating system, but it does not know about any auxiliary libraries that your project depends on. You can specify the remaining paths by either using the `"C/Cpp: Edit Configurations"` command in the command palette, or by selecting `"Edit "includePath" setting"` in the lightbulb menu (see the screenshot below). The quickiest way to locate the lightbulb is to scroll to the top of the source file and click on any green squiggle, which usually shows up at the first line in the file.
10
10
11
11

12
12
13
-
This creates or opens a file called **c_cpp_properties.json** in the .vscode directory in the opened folder in your workspace. In this file, you can specify the paths to the headers that your project depends on. Look for the section where your current configuration is defined (by default there's one configuration per OS, such as "Win32 or "Mac"), and add your paths in the `"includePath"` setting and defines in the `"defines"` setting. For example, the following screenshot shows a snippet of the file specifying path for the Mac configuration.
13
+
This creates or opens a file called **c_cpp_properties.json** in the .vscode directory in the opened folder. In this file, you can specify the paths to the headers that your project depends on. Look for the section where your current configuration is defined (by default there's one configuration per OS, such as "Win32 or "Mac"), and add your paths in the `"includePath"` setting and defines in the `"defines"` setting. For example, the following screenshot shows a snippet of the file specifying path for the Mac configuration.
You can either hover over the green squiggles to see the message in the tooltip, or open the Problems window to understand which headers the IntelliSense engine is unable to open.
@@ -30,7 +30,8 @@ You can also leverage the lightbulb path suggestions lightbulb to auto-resolve t
30
30
31
31
#### 2. Use compile_commands.json file to supply includePaths and defines information
32
32
33
-
If your build system is able to produce a compile_commands.json file, which can be auto-generated by build systems such as CMake and Ninja, the extension can get the information for the `"includePath"` and `"defines"` from that. Set the `"compileCommands"` property to the full path to your compile_commands.json file and the extension will use that instead of the `"includes"` and `"defines"` properties for IntelliSense.
33
+
If your build system is able to produce a compile_commands.json file, which can be auto-generated by build systems such as CMake and Ninja, the extension can get the information for the `"includePath"` and `"defines"` from that. Set the `"compileCommands"` property to the full path to your compile_commands.json file and the extension will use that instead of the `"includes"` and `"defines"` properties for IntelliSense.
0 commit comments