알짜게시판

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",

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

            "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",

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

            "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 선택
번호 제목 글쓴이 조회 날짜
222 [Linux] 데몬(systemd service) 작성 및 실행하기 8,501 03-14
221 [PHP] Porto 테마에서 포스팅만 Loading Overlay 12,263 03-08
220 [그누보드] 아이디 대신 이메일로 회원 가입하기 36,099 02-02
219 [시크릿DNS] Kaspersky 백신 사용시 DNS 암호화 관련 3 62,617 01-04
218 [칼무리] 영역화면 크기 오류인 경우 73,950 12-12
217 [MySQL] 업데이트 이후 에러 발생([ERROR] Incorrect definition of table … 75,418 12-08
216 구글 크롬 탭검색 비활성화 70,782 12-04
215 [MySQL] MySQL, MariaDB 업데이트 72,643 11-24
214 [아이폰] HTTPS 감청 우회하기 86,800 11-01
213 Windows에 Rust 설치하기 56,362 10-05
212 HTTPS/DNS 차단 쉽게 이해하기 61,352 08-16
211 ChangeDNS - DNS 서버를 손쉽게 변경합니다. 68,774 08-13
210 [ReactNative] android directory was detected in the project. 64,558 07-20
209 [리눅스] 메일(Mail) 삭제/초기화 57,235 07-18
208 [Delphi] 윈도우 알림센터에 메시지 출력하기 54,396 06-20
207 [그누보드] 사이드바 만들기 88,480 05-04
206 텔레그램 봇 (Telegram Bot) 만들기 37,124 05-03
205 [부트스트랩] nav 에서 하위 항목 활성화 시 부모 항목 활성화 34,245 04-30
204 [리눅스] PHP 버전 추가하기 33,872 04-29
203 [PHP] Curl 접속 속도가 늦은 경우 35,504 04-10
202 [윈도우] 파일 내용 검색 44,900 02-09
201 [MySQL] unblock with 'mysqladmin flush-hosts' 에러 52,841 01-01
200 [ReactNative] 캐시 초기화 하는 방법 55,156 12-27
199 killer 네트워크 이슈 팁 1 64,006 12-04
198 [윈도우] node.js 와 npm 업데이트(업그레이드) 56,614 12-01
197 [윈도우] 윈도우11 시작 메뉴 위치 변경(가운데, 왼쪽) 59,778 10-10
196 [Delphi] 중복 실행 방지 58,247 09-21
195 [리눅스] yum 에서 Thread died in Berkeley DB library 오류 57,949 09-18
194 [리눅스] VNSTAT 설치하기 55,364 09-17
193 [리눅스] 로그 삭제 및 비우기(?) 56,661 09-09
192 [Delphi] 파일 포맷 알아내기 50,701 09-08