I’m getting
- Executing task: C/C++: gcc.exe build active file
<code>Starting build...
cmd /c chcp 65001>nul && C:msys64ucrt64bingcc.exe -fdiagnostics-color=always -g C:UsersVectorDesktop1main.cpp -o C:UsersVectorDesktop1main.exe
Build finished with error(s).
</code>
<code>Starting build...
cmd /c chcp 65001>nul && C:msys64ucrt64bingcc.exe -fdiagnostics-color=always -g C:UsersVectorDesktop1main.cpp -o C:UsersVectorDesktop1main.exe
Build finished with error(s).
</code>
Starting build...
cmd /c chcp 65001>nul && C:msys64ucrt64bingcc.exe -fdiagnostics-color=always -g C:UsersVectorDesktop1main.cpp -o C:UsersVectorDesktop1main.exe
Build finished with error(s).
- The terminal process failed to launch (exit code: -1).
- Terminal will be reused by tasks, press any key to close it.
on windows 10 1709
my tasks.json
<code> {
"version": "2.0.0",
"tasks": [
{
"label": "build",
"command": "g++",
"args": [
"-g",
"${file}",
"-o",
"${fileDirname}/${fileBasenameNoExtension}"
],
"options": {
"cwd": "${fileDirname}"
}
},
]
}
</code>
<code> {
"version": "2.0.0",
"tasks": [
{
"label": "build",
"command": "g++",
"args": [
"-g",
"${file}",
"-o",
"${fileDirname}/${fileBasenameNoExtension}"
],
"options": {
"cwd": "${fileDirname}"
}
},
]
}
</code>
{
"version": "2.0.0",
"tasks": [
{
"label": "build",
"command": "g++",
"args": [
"-g",
"${file}",
"-o",
"${fileDirname}/${fileBasenameNoExtension}"
],
"options": {
"cwd": "${fileDirname}"
}
},
]
}
launch.json
<code> {
"version": "0.2.0",
"configurations": [
{
"name": "Debug C++",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/.dist/main.exe",
"args": [],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": false,
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
],
"preLaunchTask": "build"
}
]
}
</code>
<code> {
"version": "0.2.0",
"configurations": [
{
"name": "Debug C++",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/.dist/main.exe",
"args": [],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": false,
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
],
"preLaunchTask": "build"
}
]
}
</code>
{
"version": "0.2.0",
"configurations": [
{
"name": "Debug C++",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/.dist/main.exe",
"args": [],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": false,
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
],
"preLaunchTask": "build"
}
]
}
c_cpp_properties.json
<code>{
"configurations": [
{
"name": "Win32",
"includePath": [
"${workspaceFolder}/**",
"C:/msys64/ucrt64/include"
],
"defines": [
"_DEBUG",
"UNICODE",
"_UNICODE"
]
}
],
"version": 4
}
</code>
<code>{
"configurations": [
{
"name": "Win32",
"includePath": [
"${workspaceFolder}/**",
"C:/msys64/ucrt64/include"
],
"defines": [
"_DEBUG",
"UNICODE",
"_UNICODE"
]
}
],
"version": 4
}
</code>
{
"configurations": [
{
"name": "Win32",
"includePath": [
"${workspaceFolder}/**",
"C:/msys64/ucrt64/include"
],
"defines": [
"_DEBUG",
"UNICODE",
"_UNICODE"
]
}
],
"version": 4
}
main.cpp
file is
<code>#include <stdio.h>
int main()
{
printf("sf");
return 0;
}
</code>
<code>#include <stdio.h>
int main()
{
printf("sf");
return 0;
}
</code>
#include <stdio.h>
int main()
{
printf("sf");
return 0;
}
the only error I’m getting
Build finished with error(s).
- The terminal process failed to launch (exit code: -1).
- Terminal will be reused by tasks, press any key to close it.
why, how to fix it
8