ABOUT ME

-

Today
-
Yesterday
-
Total
-
  • vscode c++17 setting
    카테고리 없음 2022. 4. 12. 00:33

    tasks.json

    {
        "version": "2.0.0",
        "runner": "terminal",
        "type": "shell",
        "echoCommand": true,
        "presentation": {
            "reveal": "always"
        },
        "tasks": [
            {
                "label": "save and compile for C++",
                "command": "g++",
                "args": [
                    "-std=c++17",
                    "${file}",
                    "-o",
                    "${fileDirname}/${fileBasenameNoExtension}"
                ],
                "group": "build",
                "problemMatcher": {
                    "fileLocation": [
                        "relative",
                        "${workspaceRoot}"
                    ],
                    "pattern": {
                        "regexp": "^(.*):(\\d+):(\\d+):\\s+(warning error):\\s+(.*)$",
                        "file": 1,
                        "line": 2,
                        "column": 3,
                        "severity": 4,
                        "message": 5
                    }
                }
            },
            {
                "label": "save and compile for C",
                "command": "gcc",
                "args": [
                    "${file}",
                    "-o",
                    "${fileDirname}/${fileBasenameNoExtension}"
                ],
                "group": "build",
                "problemMatcher": {
                    "fileLocation": [
                        "relative",
                        "${workspaceRoot}"
                    ],
                    "pattern": {
                        "regexp": "^(.*):(\\d+):(\\d+):\\s+(warning error):\\s+(.*)$",
                        "file": 1,
                        "line": 2,
                        "column": 3,
                        "severity": 4,
                        "message": 5
                    }
                }
            },
            {
                "label": "execute",
                "command": "cmd",
                "group": "test",
                "args": [
                    "/C",
                    "${fileDirname}\\${fileBasenameNoExtension}"
                ]
            },
            {
                "type": "cppbuild",
                "label": "C/C++: gcc.exe 활성 파일 빌드",
                "command": "C:\\Program Files (x86)\\mingw64\\bin\\gcc.exe",
                "args": [
                    "-std=c++17",
                    "-g",
                    "${file}",
                    "-o",
                    "${fileDirname}\\${fileBasenameNoExtension}.exe"
                ],
                "options": {
                    "cwd": "${fileDirname}"
                },
                "problemMatcher": [
                    "$gcc"
                ],
                "group": "build",
                "detail": "디버거에서 생성된 작업입니다."
            },
            {
                "type": "cppbuild",
                "label": "C/C++: g++.exe 활성 파일 빌드",
                "command": "C:\\Program Files (x86)\\mingw64\\bin\\g++.exe",
                "args": [
                    "-std=c++17",
                    "-g",
                    "${file}",
                    "-o",
                    "${fileDirname}\\${fileBasenameNoExtension}.exe"
                ],
                "options": {
                    "cwd": "${fileDirname}"
                },
                "problemMatcher": [
                    "$gcc"
                ],
                "group": "build",
    //            "group": {
    //               "kind": "build",
    //                "isDefault": true
    //            },
                
                "detail": "디버거에서 생성된 작업입니다."
            },
            {
                "type": "cppbuild",
                "label": "C/C++: gcc.exe 활성 파일 빌드",
                "command": "C:\\Program Files (x86)\\mingw64\\bin\\gcc.exe",
                "args": [
                    "-g",
                    "${file}",
                    "-o",
                    "${fileDirname}\\${fileBasenameNoExtension}.exe"
                ],
                "options": {
                    "cwd": "${fileDirname}"
                },
                "problemMatcher": [
                    "$gcc"
                ],
                "group": "build",
                  
                // "group": {
                //     "kind": "build",
                //     "isDefault": true
                // },
    
                "detail": "컴파일러: C:\\Program Files (x86)\\mingw64\\bin\\gcc.exe"
            }
        ]
    }

     

    c_cpp_properties.json

    {
        "configurations": [
            {
                "name": "Win32",
                "includePath": [
                    "${workspaceFolder}/**"
                ],
                "defines": [
                    "_DEBUG",
                    "UNICODE",
                    "_UNICODE"
                ],
                "compilerPath": "C:\\Program Files (x86)\\mingw64\\bin\\gcc.exe",
                "cStandard": "gnu17",
                "cppStandard": "gnu++17",
                "intelliSenseMode": "windows-gcc-x64"
            }
        ],
        "version": 4
    }

    댓글

Designed by Tistory.