According to the following link, I installed and execute the sample CPP program. But I have an error:
https://code.visualstudio.com/docs/cpp/config-mingw
Tasks.json
{
"version": "2.0.0",
"tasks": [
{
"type": "shell",
"label": "C/C++: g++.exe build active file",
"command": "C:\\Program Files (x86)\\mingw-w64\\i686-8.1.0-posix-dwarf-rt_v6-rev0\\mingw32\\bin\\g++.exe",
"args": [
"-g",
"${file}",
"-o",
"${fileDirname}\\${fileBasenameNoExtension}.exe"
],
"options": {
"cwd": "${workspaceFolder}"
},
"problemMatcher": [
"$gcc"
],
"group": {
"kind": "build",
"isDefault": true
}
}
]
}
PS F:\VS_Code\projects\cpp\helloworld> helloworld.exe helloworld.exe : The term 'helloworld.exe' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At line:1 char:1
- helloworld.exe
-
+ CategoryInfo : ObjectNotFound: (helloworld.exe:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException
Suggestion [3,General]: The command helloworld.exe was not found, but does exist in the current location. Windows PowerShell does not load commands from the current location by default. If you trust this command, instead type: ".\helloworld.exe". See "get-help about_Command_Precedence" for more details
