Ошибка в терминале при компиляции .cpp vscode
При запуске любого cpp файла в vscode на этапе билда активного файла g++.exe в терминале появляется ошибка, но, код запускается и работает корректно.
Ошибка:
Выполнение задачи: c:/msys64/mingw64/bin/g++.exe -std=c++17 -g D:\need\test\main.cpp -o ${fileDirname\${fileBasenameNoExtension}.exe
строка:1 знак:86
+ ... .exe -std=c++17 -g D:\need\test\main.cpp -o ${fileDirname\${fileBasen ...
+ ~ Используйте в именах переменных "`{", а не "{".
+ CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : OpenBraceNeedsToBeBackTickedInVariableName
Мои конфигурационные файлы:
launch.json:
{
"version": "0.2.0",
"configurations": [
{
"name": "g++.exe build and debug active file",
"type": "cppdbg",
"request": "launch",
"program": "${fileDirname}\\${fileBasenameNoExtension}.exe",
"args": [],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": false,
"MIMode": "gdb",
"miDebuggerPath": "C:\\msys64\\mingw64\\bin\\gdb.exe",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
],
"preLaunchTask": "g++.exe build active file",
"internalConsoleOptions": "neverOpen"
},
{
"name": "C/C++: g++.exe сборка и отладка активного файла",
"type": "cppdbg",
"request": "launch",
"program": "${fileDirname}\\${fileBasenameNoExtension}.exe",
"args": [],
"stopAtEntry": false,
"cwd": "${fileDirname}",
"environment": [],
"externalConsole": false,
"MIMode": "gdb",
"miDebuggerPath": "C:\\msys64\\mingw64\\bin\\gdb.exe",
"setupCommands": [
{
"description": "Включить автоматическое форматирование для gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
},
{
"description": "Задать для варианта приложения дизассемблирования значение Intel",
"text": "-gdb-set disassembly-flavor intel",
"ignoreFailures": true
}
],
"preLaunchTask": "C/C++: g++.exe сборка активного файла"
}
]
}
tasks.json:
{
"version": "2.0.0",
"tasks": [
{
"type": "shell",
"label": "g++.exe build active file",
"command": "c:/msys64/mingw64/bin/g++.exe",
"args": [
"-std=c++17",
"-g",
"${file}",
"-o",
"${fileDirname\\${fileBasenameNoExtension}.exe"
],
"options": {
"cwd": "c:\\msys64\\mingw64\\bin"
},
"problemMatcher": [
"$gcc"
],
"group": "build"
},
{
"type": "cppbuild",
"label": "C/C++: g++.exe сборка активного файла",
"command": "C:\\msys64\\mingw64\\bin\\g++.exe",
"args": [
"-fdiagnostics-color=always",
"-g",
"${file}",
"-o",
"${fileDirname}\\${fileBasenameNoExtension}.exe"
],
"options": {
"cwd": "${fileDirname}"
},
"problemMatcher": [
"$gcc"
],
"group": {
"kind": "build",
"isDefault": true
},
"detail": "Задача создана отладчиком.",
"presentation": {
"clear": true
}
}
]
}
settings.json:
{
"files.associations": {
"ostream": "cpp",
"iostream": "cpp",
"iomanip": "cpp",
"chrono": "cpp",
"iosfwd": "cpp",
"thread": "cpp",
"array": "cpp",
"string_view": "cpp",
"initializer_list": "cpp",
"utility": "cpp",
"valarray": "cpp",
"optional": "cpp",
"sstream": "cpp"
}
}
c_cpp_properties.json:
{
"configurations": [
{
"name": "Win32",
"includePath": [
"${workspaceFolder}/**",
"c:/msys64/mingw64/include/**"
],
"defines": [
"_DEBUG",
"UNICODE",
"_UNICODE"
],
"windowsSdkVersion": "8.1",
"compilerPath": "C:\\msys64\\mingw64\\bin\\g++.exe",
"cStandard": "c11",
"cppStandard": "c++17",
"intelliSenseMode": "gcc-x86"
}
],
"version": 4
}