set .vscode for c++

   日期:2020-07-07     浏览:106    评论:0    
核心提示:set .vscode for c++reference// c_cpp_properties.json{ // >c/c++ configurations(ui) configurations: [ { name: Win32, includePath: [ ${workspaceFolder}/** ], defines

reference

pre-requisite

  1. mingw64
  2. vscode 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
}
 
打赏
 本文转载自:网络 
所有权利归属于原作者,如文章来源标示错误或侵犯了您的权利请联系微信13520258486
更多>最近资讯中心
更多>最新资讯中心
0相关评论

推荐图文
推荐资讯中心
点击排行
最新信息
新手指南
采购商服务
供应商服务
交易安全
关注我们
手机网站:
新浪微博:
微信关注:

13520258486

周一至周五 9:00-18:00
(其他时间联系在线客服)

24小时在线客服