Visual Studio Code 切换 C++库

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/sinat_34524528/article/details/86002005

https://github.com/Microsoft/vscode-cpptools/blob/master/Documentation/Getting started with IntelliSense configuration.md

c_cpp_properties.json

{
    "configurations": [{
            "name": "Win32",
            "includePath": [
                "${workspaceFolder}/**"
            ],
            "defines": [
                "_DEBUG",
                "UNICODE",
                "_UNICODE"
            ],
            "windowsSdkVersion": "10.0.17763.0",
            "compilerPath": "D:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx64/x64/cl.exe",
            "intelliSenseMode": "msvc-x64"
        },
        {
            "name": "WSL",
            "intelliSenseMode": "gcc-x64",
            "compilerPath": "/usr/bin/gcc",
            "includePath": [
                "${workspaceFolder}/**"
            ],
            "defines": [],
            "cStandard": "c11",
            "cppStandard": "c++17"
        },
        {
            "name": "MinGW",
            "includePath": [
                "${workspaceFolder}/**"
            ],
            "defines": [
                "_DEBUG",
                "UNICODE",
                "_UNICODE"
            ],
            "compilerPath": "C:\\MinGW\\bin\\gcc.exe",
            "cStandard": "c11",
            "cppStandard": "c++17",
            "intelliSenseMode": "clang-x64"
        }
    ],
    "version": 4
}

写好保存,通过右下角快速切换
https://youtu.be/-erXR6k9TeE?t=4442

在这里插入图片描述

参考:https://github.com/Microsoft/vscode-cpptools/blob/master/Documentation/LanguageServer/Windows Subsystem for Linux.md

猜你喜欢

转载自blog.csdn.net/sinat_34524528/article/details/86002005
今日推荐