【发布时间】:2017-09-26 09:26:17
【问题描述】:
我刚刚安装了 VSCode(在 Windows 上),我正在尝试使用 cygwin 运行 C 编译器。我正在关注这个页面:https://code.visualstudio.com/docs/languages/cpp。
我的 c_cpp_properites.json 和 launch.json 文件很好。我认为这是我的tasks.json 文件的问题:
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"taskName": "Build test",
"type": "shell",
"command": "g++",
"args": [
"-g",
"test.c"
],
"group": {
"kind": "build",
"isDefault": true
},
"problemMatcher": []
}
]
}
我只是想运行simple Hello World program。正如终端所说,任务运行:
执行任务:g++ -g test.c
并且在输出终端上什么也没有出现。我可以从 cmd 运行 a.exe 文件,它可以工作,但我宁愿在 VSCode 中打印输出。
【问题讨论】:
标签: windows cygwin visual-studio-code