-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to resolve includes with relative paths #366
Comments
How do you know no browse.VC.db is created? Where are you looking for the file and what symptom are you getting? What happens when you change the database filename setting "databaseFilename" : "//.browse.vc.db". |
Ok, found files in |
With the example provided, the 2nd line of the include path is missing a leading " quote. I'm not able to repro the bug. Where is the source file and what header are you trying to find? If the Microsoft.VSCode.CPP.Extension.* process is still building the browse database, then the #include finding may not work yet. |
@sean-mcmanus Fixed the " typo. It doesn't look like the browse DB is still built, at least timestamp and size haven't changed anymore |
It looks like we are not expanding the ${workspaceRoot} (we internally add that path and children, but adding the ".." doesn't expand it). Replacing that by the actual path seems to fix the issue. Is that what you are seeing? |
A fix should be in the release after the next release. Manually expanding the ${workspaceRoot} should be a workaround. |
A relative path doesn't work (e.g. I haven't tried absolute path, because in our setup this makes no sense, where developers could clone the repo with the workspaces to arbitrary locations. Because the relative paths didn't work I came up with ${workspaceRoot}, which doesn't seem to work either |
I just confirmed that absolute paths work, however this doesn't make sense in our environment, because every developer may clone the workspaces at different locations. I'd really appreciate, if relative paths or at least with |
Using a relative path works on Windows, but it doesn't work on Linux (i.e. a bug). Using ${workspaceRoot}/../MyLib2 should work in the release after the next, though. |
This should be fixed now. |
I have multiple VSCode workspaces side-by-side, e.g.
I include headers from other workspaces in my workspace. Now I tried to resolve the includes with
I tried also
"${workspaceRoot}/../MyLib1/src
" or relative paths like"../MyLib1/src"
.Unfortunately this doesn't work and no browse.VC.db is created.
I use
CentOS 7.2
VSCode 1.7.2
cpptools 0.9.2
The text was updated successfully, but these errors were encountered: