【发布时间】:2020-10-01 19:00:34
【问题描述】:
我在安装了 MSYS2 + mingw-w64-x86_64-gcc + base-devel 的 Windows 7 上使用 VSCode。
我的项目有tasks.json,运行make 命令来构建:
{
"tasks": [
{
"type": "shell",
"label": "build",
"command": "make",
"options": {
"cwd": "${workspaceFolder}"
},
"problemMatcher": [
"$gcc"
],
"group": {
"kind": "build",
"isDefault": true
}
}
],
"version": "2.0.0"
}
问题是GCC通过以下方式生成错误信息:
src/src_file.cpp:773:59: error: comparison of integer expressions of different signedness
而$workspaceFolder变量中存储的项目路径为D:\myproject。
文件的真实路径是D:\myproject\tools\src\src_file.cpp。在这种情况下,我不知道如何设置问题匹配器。我想Linux风格的斜杠会影响问题,但我不确定。我试图为匹配器设置regexp,但是我无法让它工作。
更新:
实际上斜线和反斜线不会影响结果。
【问题讨论】:
标签: visual-studio-code mingw-w64