728x90
{
   "version": "2.0.0",
   "runner": "terminal",
   "type": "shell",
   "echoCommand": true,
   "presentation" : { "reveal": "always" },
   "tasks": [
         {
           "label": "save and compile for C++",
           "command": "g++",
           "args": [
               "${file}",
               "-o",
               "${fileDirname}/${fileBasenameNoExtension}"
           ],
           "group": "buil
           "problemMatcher": {
               "fileLocation": [
                   "relative",
                   "${workspaceRoot}"
               ],
               "pattern": {
                  // The regular expression.
                  //Example to match: helloWorld.c:5:3: warning: implicit declaration of function 'prinft'
                   "regexp": "^(.*):(\\d+):(\\d+):\\s+(warning error):\\s+(.*)$",
                   "file": 1,
                   "line": 2,
                   "column": 3,
                   "severity": 4,
                   "message": 5
               }
           }
       },
       {

           "label": "execute",

           "command": "cd ${fileDirname} &&./${fileBasenameNoExtension}",

           "group": "test"

       }
   ]
}

 

이건 c++,

 

{
   "version": "2.0.0",
   "runner": "terminal",
   "type": "shell",
   "echoCommand": true,
   "presentation" : { "reveal": "always" },
   "tasks": [
       {
           "label": "save and compile for C",
           "command": "gcc",
           "args": [
               "${file}",
               "-o",
               "${fileDirname}/${fileBasenameNoExtension}"
           ],
           "group": "build",
           "problemMatcher": {
               "fileLocation": [
                   "relative",
                   "${workspaceRoot}"
               ],
               "pattern": {
                  // The regular expression.
                  //Example to match: helloWorld.c:5:3: warning: implicit declaration of function 'prinft'
                   "regexp": "^(.*):(\\d+):(\\d+):\\s+(warning error):\\s+(.*)$",
                   "file": 1,
                   "line": 2,
                   "column": 3,
                   "severity": 4,
                   "message": 5
               }
           }
       },
       {

           "label": "execute",

           "command": "cd ${fileDirname} &&./${fileBasenameNoExtension}",

           "group": "test"

       }
   ]
}

 

이건 c용.

tasks.json파일에 붙여넣으면 된다.

728x90

'etc' 카테고리의 다른 글

nc서버 만들기 (로컬)  (0) 2020.11.08
[Android&ios} root  (4) 2020.10.05
window 내장 우분투 이용하기 (gui)  (0) 2020.09.26
파일노리 제휴컨텐츠(영상) 다운받는법  (0) 2020.07.27

+ Recent posts