amp*_*ier 4 c++ ubuntu visual-studio-code
我正在尝试编译一个非常简单的代码。我放入了从这里复制的 tasks.json 配置 。
{
"version": "2.0.0",
"tasks": [
{
"label": "build & debug file",
"type": "shell",
"command": "g++",
"args": [
"-g",
"-o",
"${fileBasenameNoExtension}",
"${file}"
],
"group": {
"kind": "build",
"isDefault": true
}
},
{
"label": "build & run file",
"type": "shell",
"command": "g++",
"args": [
"-o",
"${fileBasenameNoExtension}",
"${file}"
],
"group": {
"kind": "build",
"isDefault": true
}
}
]
}
Run Code Online (Sandbox Code Playgroud)
但是当我构建 (ctrl+shift+b) 时出现错误:
usr/bin/ld:/home/username/LinuxProjects/FirstCppProject/.vscode/tasks.json:文件格式无法识别;视为链接器脚本 /usr/bin/ld:/home/username/LinuxProjects/FirstCppProject/.vscode/tasks.json:1:语法错误 collect2:错误:ld 返回 1 退出状态终端进程以退出代码终止:1
我不明白 json 有什么问题。
| 归档时间: |
|
| 查看次数: |
3085 次 |
| 最近记录: |