0
点赞
收藏
分享

微信扫一扫

C++ Cmake + VS Code 构建

钟罗敏 2022-03-11 阅读 136
{   
    "version": "2.0.0",
    "options": {
        "cwd": "${workspaceFolder}/build"
    },
    "tasks": [
        {
            "type": "shell",
            "label": "cmake",
            "command": "cmake",
            "args": [
                ".."
            ],
        },
        {
            "label": "make",
            "group": {
                "kind": "build",
                "isDefault": true
            },
            "command": "mingw32-make",
            "args": [

            ],
        },
        {
            "label": "Build",
            "dependsOn":[
                "cmake",
                "make"
            ]
        }
    ],

}

1.在Vscode中将task.json替换如上格式

2.对应的label名称需要对应launch.json 的preLaunchTask 字段

## 插件安装

 

## 新建CMakeLists.txt

 

ctrl+shift+p

 

## 安装 mingw64 

举报

相关推荐

0 条评论