알짜게시판

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 선택

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

번호 제목 글쓴이 조회 날짜
71 [HTML] 애드센스 자동 광고 사용 시 빈 화면이 출력된다면? 16,626 06-20
70 [워드프레스] xmlrpc.php 차단으로 보안 강화하기 30,878 06-05
69 [Delphi] 폼이 모니터 한 가운데 있는 경우 자연스럽게 왼쪽으로 이동시키기 40,735 05-26
68 [윈도우] WSH script registration is not valid. 44,141 05-23
67 [워드프레스] 제목 블록 기본값을 H5로 변경하는 방법 44,011 05-22
66 [파이썬] 동영상 특정 영역 모자이크(흐리게) 하기 46,300 04-30
65 [리눅스] 구글 크롬 콘솔 'Attestation check for Topics on' 에러 원인 & 해결방… 59,360 04-11
64 [크롬] 개발자 도구(DevTools)에서 붙여넣기 안될때 71,594 03-10
63 [그누보드] SmartEditor2Skin.html 다운로드 되는 현상 109,700 01-08
62 [PHP] 검색 로봇 접속시 종료 56,008 10-07
61 [리눅스] PHP-FPM 튜닝을 위한 메모리 계산 41,015 08-29
60 [윈도우] 아이폰 벨소리 쉽게 추가하기 93,865 06-14
59 [윈도우] C:\Windows\Installer 폴더 다른 드라이브로 옮기기 104,516 05-29
58 [PHP] REQUEST 값 받기(application/json 포함) 98,936 04-20
57 [리눅스] 데몬(systemd service) 작성 및 실행하기 65,912 03-14
56 [MySQL] 업데이트 이후 에러 발생([ERROR] Incorrect definition of table … 91,651 12-08
55 구글 크롬 탭검색 비활성화 72,533 12-04
54 [MySQL] MySQL, MariaDB 업데이트 73,676 11-24
53 [아이폰] HTTPS 감청 우회하기 300,996 11-01
52 Windows에 Rust 설치하기 57,592 10-05
51 [ReactNative] android directory was detected in the project. 65,555 07-20
50 [리눅스] 메일(Mail) 삭제/초기화 58,413 07-18
49 [Delphi] 윈도우 알림센터에 메시지 출력하기 55,660 06-20
48 텔레그램 봇 (Telegram Bot) 만들기 38,281 05-03
47 [부트스트랩] nav 에서 하위 항목 활성화 시 부모 항목 활성화 35,050 04-30
46 [리눅스] PHP 버전 추가하기 34,772 04-29
45 [PHP] Curl 접속 속도가 늦은 경우 36,775 04-10
44 [윈도우] 파일 내용 검색 45,887 02-09
43 [MySQL] unblock with 'mysqladmin flush-hosts' 에러 53,881 01-01
42 [ReactNative] 캐시 초기화 하는 방법 57,538 12-27
41 [윈도우] node.js 와 npm 업데이트(업그레이드) 57,577 12-01
목록