set .vscode for c++

    技术2026-08-14  17

    reference

    pre-requisite

    mingw64vscode and its extensions for c++ // c_cpp_properties.json { // >c/c++ configurations(ui) "configurations": [ { "name": "Win32", "includePath": [ "${workspaceFolder}/**" ], "defines": [ "_DEBUG", "UNICODE", "_UNICODE" ], "compilerPath": "D:/Apps/mingw64/bin/g++.exe", // >(ui) "cStandard": "c11", "cppStandard": "gnu++14", "intelliSenseMode": "gcc-x64" // >(ui) } ], "version": 4 } // tasks.json { // >tasks: configure default build task "version": "2.0.0", "tasks": [ { "type": "shell", "label": "g++.exe build", "command": "D:/Apps/mingw64/bin/g++.exe", "args": [ "-g", "D:/Codes/cpp/${fileBasenameNoExtension}.cpp", // hard-coded in{.cpp} "-o", "D:/Codes/cpp/.out/${fileBasenameNoExtension}.exe" // hard_coded out{.exe} // "${fileDirname}/${fileBasenameNoExtension}.exe" ], "options": { // "cwd": "D:/Apps/mingw64/bin" "cwd": "D:/Apps/Git/bin" }, "problemMatcher": [ "$gcc" ], "group": { "kind": "build", // ctrl-shift-b to build "isDefault": true } } ] } // settings.json { // >preferences:open settings(json) "editor.formatOnSave": true, // ctrl-shift-x: clang-format }
    Processed: 0.008, SQL: 9