I'm struggling with the includePath setting on a bigger project source. Let's say I have a folder structure like:
/BaseComponent/public
/BaseComponent/include
/BaseComponent/source
/SubComponent1/public
/SubComponent1/include
/SubComponent1/source
/SubComponent1/SubSubComponent/public
/SubComponent1/SubSubComponent/include
/SubComponent1/SubSubComponent/source
/SubComponent2/public
/SubComponent2/include
/SubComponent2/source
I tried to do a configuration like this:
"includePath": [
...
"${workspaceRoot}",
"${workspaceRoot}/*/include",
"${workspaceRoot}/*/public"
],
But this didn't appear to work out. Is there a way to have just all header inside the workspaceRoot used? Something like "include all subfolder"?
OR another way to define a path which is project in dependend?
The -R (uppercase R) option lists all subdirectories, recursively. That shows you the whole directory tree starting at the current directory (or the directories you name on the command line).
A subdirectory is a type of website hierarchy under a root domain that uses folders to organize content on a website. A subdirectory is the same as a subfolder and the names can be used interchangeably.
In the Windows search bar, type 'settings' to open your Windows Settings. Search for Edit environment variables for your account. Choose the Path variable in your User variables and then select Edit. Select New and add the Mingw-w64 destination folder path to the system path.
I believe this is what you are looking for:
"${workspaceFolder}/**"
Assuming all the dirs are inside your working space folder.
That is not yet possible/supported, as mentioned in Microsoft/vscode-cpptools
issue 849.
Example of a context illustrating that issue:
The
includePath
doesn't seem to work with NuGet packages since the directory name includes the version.
For example, if we usepackage rapidjson 1.0.
2 and later upgrade, we'd have to update references to "packages/rapidjson.1.0.2/build/native/include
" in this file - in additional to anypackages.config
files.
It would be nice if we could use wildcards in directory specifiers or some other means of not having to maintain the same information in two different places.
So the alternative is to version a script able to generate the configuration file by updating the IncludePath
section with all include folders found.
Note: issue 849 is actually a duplicate of issue 723, which states (Bob Brown, from Microsoft):
A middle wildcard is not currently supported.
I started a branch that would support this a while ago, but I forget what state it was in and now the branch is out of date.
If anyone wants to get it back in sync with master and finish it, we can consider taking it.
I'll reopen this issue since the original request was not actually addressed.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With