私はVSCode(Windows版)をインストールしましたが、cygwinを使ってCコンパイラを実行しようとしています。私はこのページに従っています:https://code.visualstudio.com/docs/languages/cpp。cygwinを使ったVisual Studioコード
私のc_cpp_properites.json
とlaunch.json
ファイルは問題ありません。私はそれが私のtasks.json
ファイルに問題だと思う:私はちょうどsimple Hello World programを実行しようとしている
{
// 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": []
}
]
}
。タスクは次のように実行されます。
実行タスク:g ++ -g test.c <端末はタスクによって再利用され、任意のキーを押して終了します。
出力端子に何も表示されません。私はcmdからa.exe
ファイルを実行することができ、それは動作しますが、出力はむしろVSCode内に出力されます。