windows下Vscode C/C++ 配置

发布时间 2023-03-23 16:13:02作者: avengekiller

注意

  • 目录不能包含中文和空格, 文件名不能使用中文, 否则可能程序可以运行但不能调试;
  • vscode的.json文件配置目录分割符是"/"或双斜杠转义,而windows的文件系统使用的是"\".
    下面是我的配置
{
    "configurations": [
        {
            "name": "Win32",
            "includePath": [
                "${workspaceFolder}/**"
            ],
            "defines": [
                "_DEBUG",
                "UNICODE",
                "_UNICODE"
            ],
            "compilerPath": "C:\\Software\\Code\\mingw64\\bin\\g++.exe",
            "cStandard": "gnu17",
            "cppStandard": "gnu++14",
            "intelliSenseMode": "gcc-x64"
        }
    ],
    "version": 4
}