알짜게시판

VS Code 설치방법

1. <A HREF="https://sourceforge.net/projects/mingw/files/Installer/" TARGET="_blank"  rel="nofollow">https://sourceforge.net/projects/mingw/files/Installer/</A>
2. mingw-get-setup.exe 다운로드 후 실행
3. 기본 옵션으로 설치
4. MinGW 설치 매니저창에서 Basic Setup - mingw-developer-toolkit, mingw32-base, mingw32-gcc-g++ 체크
  (msys-base 도 생각해봄)
5. 메뉴 - Install - Apply Change
6. Apply 클릭
7. sysdm.cpl
8. 고급 - 환경 변수
9. 시스템 변수 - Path - C:\MinGW\bin 추가

10. VS Code 설치
11. 메뉴 - View - Extensions
12. "korean" 검색
13. Korean Language Pack for Visual Studio Code 선택 및 인스톨
14. VS Code 재시작
15. 메뉴 - 이동 - 파일로 이동
    "ext install c/c++" 입력
16. C/C++ - 설치

20. 메뉴 - 파일 - 기본 설정 - 바로 가기 키
[code]
// 키 바인딩을 이 파일에 넣어서 기본값을 덮어씁니다.
[
    //컴파일
    { "key": "ctrl+f9", "command": "workbench.action.tasks.build" },
   
    //실행
    { "key": "f9", "command": "workbench.action.tasks.test" }
]
[/code]
16. 메뉴 - 터미널 - 기본 빌드 작업 구성
17. "템플릿에서 tasks.json 파일 만들기" 선택
18. "Other 임의의 외부 명령을 실행하는 예" 선택
19. tasks.json 을 아래 내용으로 교체
[code]
{
    "version": "2.0.0",
    "runner": "terminal",
    "type": "shell",
    "echoCommand": true,
    "presentation" : { "reveal": "always" },
    "tasks": [
          //C++ 컴파일
          {
            "label": "save and compile for C++",
            "command": "g++",
            "args": [
                "${file}",
                "-o",
                "${fileDirname}/${fileBasenameNoExtension}"
            ],
            "group": "build",

            //컴파일시 에러를 편집기에 반영
            //참고:  &lt;A HREF="https://code.visualstudio.com/docs/editor/tasks#_defining-a-problem-matcher" TARGET="_blank"  rel="nofollow"&gt;https://code.visualstudio.com/docs/editor/tasks#_defining-a-problem-matcher&lt;/A&gt;

            "problemMatcher": {
                "fileLocation": [
                    "relative",
                    "${workspaceRoot}"
                ],
                "pattern": {
                    // The regular expression.
                  //Example to match: helloWorld.c:5:3: warning: implicit declaration of function &#039;prinft&#039;
                    "regexp": "^(.*):(\\d+):(\\d+):\\s+(warning error):\\s+(.*)$",
                    "file": 1,
                    "line": 2,
                    "column": 3,
                    "severity": 4,
                    "message": 5
                }
            }
        },
        //C 컴파일
        {
            "label": "save and compile for C",
            "command": "gcc",
            "args": [
                "${file}",
                "-o",
                "${fileDirname}/${fileBasenameNoExtension}"
            ],
            "group": "build",

            //컴파일시 에러를 편집기에 반영
            //참고:  &lt;A HREF="https://code.visualstudio.com/docs/editor/tasks#_defining-a-problem-matcher" TARGET="_blank"  rel="nofollow"&gt;https://code.visualstudio.com/docs/editor/tasks#_defining-a-problem-matcher&lt;/A&gt;

            "problemMatcher": {
                "fileLocation": [
                    "relative",
                    "${workspaceRoot}"
                ],
                "pattern": {
                    // The regular expression.
                  //Example to match: helloWorld.c:5:3: warning: implicit declaration of function &#039;prinft&#039;
                    "regexp": "^(.*):(\\d+):(\\d+):\\s+(warning error):\\s+(.*)$",
                    "file": 1,
                    "line": 2,
                    "column": 3,
                    "severity": 4,
                    "message": 5
                }
            }
        },

        // 바이너리 실행(Windows)
        {
            "label": "execute",
            "command": "cmd",
            "group": "test",
            "args": [
                "/C", "${fileDirname}\\${fileBasenameNoExtension}"
            ]
   
        }
    ]
}
[/code]
21. 메뉴 - 파일 - 기본 설정 - 설정
22. 보기 - 명령 팔레트
23. C/C++ 검색
24. C/C++: Edit Configurations 선택

로그인 후 댓글내용을 입력해주세요

번호 제목 글쓴이 조회 날짜
187 [그누보드] 1364 : Field 'xxxxx' doesn't have a default value 45,314 08-20
186 [그누보드] 웹폰트 적용하기 46,445 08-13
185 [그누보드] CKEditor 5 플러그인 107,620 08-11
184 [리눅스] 윈도우 프로그램 실행 (centos7, wine 7.0) 45,179 08-09
183 [시크릿DNS] 프록시 혼합 사용 예제 2 480,886 08-07
182 [윈도우] IPv6 켜기, 끄기 45,325 08-03
181 [그누보드] 회원 가입일 기준으로 이용기간 정하기 41,252 07-28
180 [그누보드] sql_fetch, sql_query 안쓰고 직접 mysql 사용하기 40,872 07-24
179 [리눅스] 웹서버 상태 확인 후 자동 재시작 쉘 스크립트 41,229 02-28
178 WinDivert 1753 에러 발생시 41,023 12-20
177 [PHP] PHP 수정시 적용이 안되는 경우 해결 (opcache 중지) 35,486 03-31
176 [맥OS] 마우스 휠 스크롤 방향 윈도우와 일치시키는 방법 26,172 02-28
175 [Ruby] 윈도우에서 pod install 실행시 UTF-8 오류 27,022 02-28
174 [Ruby] Could not open library 'libcurl' 25,343 02-28
173 WinDivert 서비스 종료 49,800 02-08
172 [Android] Error type 3: Activity class {com.?.MainActivity} … 16,670 02-02
171 [윈도우] 윈도우 서버 2016 IIS 중지 9,022 01-29
170 [그누보드] 새 글 정리하기 4,049 01-28
169 WinDivert 오류코드 4,338 01-24
168 [PHP] Curl 을 이용하여 파일 다운로드 6,163 01-19
167 [PHP] Curl 을 이용하여 json 을 post 보내기 6,723 01-19
166 [그누보드] CKEditor 5 플러그인 10 6,829 01-14
165 칼무리 자동실행이 안 되는 원인를 찾았습니다 1 2,750 12-31
164 [PHP] 워드프레스와 그누보드 연동 모듈 3,731 12-27
163 설치하려고 하는 앱이 Microsoft에서 확인된 앱이 아닙니다. 16,567 10-11
162 [Delphi] 권한상승 2,369 09-04
161 [Delphi] Glyph 에 사용할 이미지 생성하기 1,793 09-02
160 [윈도우] WMI 복구하기 1 8,026 08-20
159 파이썬 아나콘다 업데이트 2,048 08-06
158 [Delphi] bsNone 인 폼에서 드래그 및 크기조절 3,361 07-11
157 윈도우7 에서 WinDivert 2.2 관련 오류 발생시 13,481 07-10