Type: General
The build task templates on windows, e.g. g++.exe build active file, contains:
{
"version": "2.0.0",
"tasks": [
{
"type": "shell",
"label": "g++.exe build active file",
"command": "C:\\Users\\someone\\scoop\\apps\\gcc\\current\\bin\\g++.exe",
"args": [
"-g",
"${file}",
"-o",
"${fileDirname}\\${fileBasenameNoExtension}.exe"
],
"options": {
"cwd": "C:\\Users\\someone\\scoop\\apps\\gcc\\current\\bin"
},
"problemMatcher": [
"$gcc"
],
"group": {
"kind": "build",
"isDefault": true
}
}
]
}
But the problemMatcher $gcc use relative path by default. And if there is warnings or errors emitted during the build process, we can't use the problem panel to track it down. Clicking on a problem entity will cause an error notification:
Unable to open 'test.cpp': Unable to read file 'd:\Workspaces\test\d:\Workspaces\test\test.cpp' (Error: Unable to resolve non-existing file 'd:\Workspaces\test\d:\Workspaces\test\test.cpp').
Use relative path for build by default, or use absolute path for problemMatcher $gcc by default.
It's probably better to use absolute path for problemMatecher by default, as error in library files reported by compilers will use absolute path anyway.
This should be fixed by https://github.com/microsoft/vscode-cpptools/pull/3916 .
OK, just subscribed to that PR.
Feel free to close this issue if the problem has been tracked elsewhere,
please.
On Sat, Mar 28, 2020 at 2:51 AM Sean McManus notifications@github.com
wrote:
This should be fixed by #3916
https://github.com/microsoft/vscode-cpptools/pull/3916 .—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/microsoft/vscode-cpptools/issues/5209#issuecomment-605210713,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ACUBEWMVM2U5PZ5IUKSXWBTRJTYTJANCNFSM4LUWVFQQ
.
Most helpful comment
This should be fixed by https://github.com/microsoft/vscode-cpptools/pull/3916 .