visual studio code 설치및실행 - snudcslab.snu.ac.kr/courses/ic2019s/lab0.pdf · get a visual...

18
Visual Studio Code 설치 및 실행 컴퓨터 개념 및 실습 1

Upload: others

Post on 07-Mar-2020

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Visual Studio Code 설치및실행 - SNUdcslab.snu.ac.kr/courses/ic2019s/Lab0.pdf · Get a visual overlay highlighting the major components of the UI Interactive playground Try essential

Visual Studio Code설치 및 실행

컴퓨터 개념 및 실습

1

Page 2: Visual Studio Code 설치및실행 - SNUdcslab.snu.ac.kr/courses/ic2019s/Lab0.pdf · Get a visual overlay highlighting the major components of the UI Interactive playground Try essential

교과목 개요

• 담당교수엄현상 (컴퓨터공학부)302동 324호 (02-880-6755)[email protected]://dcslab.snu.ac.kr

• 수업화요일, 목요일 13:00~13:50 (302동 208호)

• 실습수요일 18:30~20:30

• Web pagehttp://dcslab.snu.ac.kr/courses/ic2019s

2

Page 3: Visual Studio Code 설치및실행 - SNUdcslab.snu.ac.kr/courses/ic2019s/Lab0.pdf · Get a visual overlay highlighting the major components of the UI Interactive playground Try essential

Visual studio code 설치

• https://code.visualstudio.com/에서 다운로드

3

Click

Page 4: Visual Studio Code 설치및실행 - SNUdcslab.snu.ac.kr/courses/ic2019s/Lab0.pdf · Get a visual overlay highlighting the major components of the UI Interactive playground Try essential

Visual Studio Code 설치 마법사 시작

4

Page 5: Visual Studio Code 설치및실행 - SNUdcslab.snu.ac.kr/courses/ic2019s/Lab0.pdf · Get a visual overlay highlighting the major components of the UI Interactive playground Try essential

Visual Studio Code 설치 마법사(Cont’d)

5

Page 6: Visual Studio Code 설치및실행 - SNUdcslab.snu.ac.kr/courses/ic2019s/Lab0.pdf · Get a visual overlay highlighting the major components of the UI Interactive playground Try essential

6

파일을 open할 때 사용하는 앱 선택가능함

Page 7: Visual Studio Code 설치및실행 - SNUdcslab.snu.ac.kr/courses/ic2019s/Lab0.pdf · Get a visual overlay highlighting the major components of the UI Interactive playground Try essential

Visual Studio Code 설치 마법사 시작(Cont’d)

7

Page 8: Visual Studio Code 설치및실행 - SNUdcslab.snu.ac.kr/courses/ic2019s/Lab0.pdf · Get a visual overlay highlighting the major components of the UI Interactive playground Try essential

VS Code에서 C/C++ 설치

8

Page 9: Visual Studio Code 설치및실행 - SNUdcslab.snu.ac.kr/courses/ic2019s/Lab0.pdf · Get a visual overlay highlighting the major components of the UI Interactive playground Try essential

Compiler 설치

• https://sourceforge.net/projects/tdm-gcc/• 환경에 맞는 version 설치 32bit/64bit

9

Click

Page 10: Visual Studio Code 설치및실행 - SNUdcslab.snu.ac.kr/courses/ic2019s/Lab0.pdf · Get a visual overlay highlighting the major components of the UI Interactive playground Try essential

환경에 맞는 version 설치

• 32bit/64bit인지 확인하여 설치

10

Page 11: Visual Studio Code 설치및실행 - SNUdcslab.snu.ac.kr/courses/ic2019s/Lab0.pdf · Get a visual overlay highlighting the major components of the UI Interactive playground Try essential

설치 경로 설정

• Default 설정 후 Next

11

Page 12: Visual Studio Code 설치및실행 - SNUdcslab.snu.ac.kr/courses/ic2019s/Lab0.pdf · Get a visual overlay highlighting the major components of the UI Interactive playground Try essential

컴파일러 설치 완료

12

Page 13: Visual Studio Code 설치및실행 - SNUdcslab.snu.ac.kr/courses/ic2019s/Lab0.pdf · Get a visual overlay highlighting the major components of the UI Interactive playground Try essential

환경 변수 설정

13

• 검색->시스템 환경 변수 편집• 설치한 C:\TDM-GCC-64\bin를 추가

Page 14: Visual Studio Code 설치및실행 - SNUdcslab.snu.ac.kr/courses/ic2019s/Lab0.pdf · Get a visual overlay highlighting the major components of the UI Interactive playground Try essential

Compiler가 설치 되어 있는지 확인

• 검색창에 cmd라고 입력하여 명령 프롬프트를 실행함• gcc –v(c 컴파일러 버전확인)• 아래와같이 나오면 설치된것을 알 수 있음

14cmd

Page 15: Visual Studio Code 설치및실행 - SNUdcslab.snu.ac.kr/courses/ic2019s/Lab0.pdf · Get a visual overlay highlighting the major components of the UI Interactive playground Try essential

VS code 실행 및 Workplace 생성• C:\workspace를 생성 후 vs code에서 workspace폴더를 추가함

15

Page 16: Visual Studio Code 설치및실행 - SNUdcslab.snu.ac.kr/courses/ic2019s/Lab0.pdf · Get a visual overlay highlighting the major components of the UI Interactive playground Try essential

Test.c 파일 생성

• Test.c파일을 생성

16

Page 17: Visual Studio Code 설치및실행 - SNUdcslab.snu.ac.kr/courses/ic2019s/Lab0.pdf · Get a visual overlay highlighting the major components of the UI Interactive playground Try essential

C 프로그램 실행

• 아래와 같이 간단한 C 프로그램을 작성함+– Hello world 쓰기

17

Page 18: Visual Studio Code 설치및실행 - SNUdcslab.snu.ac.kr/courses/ic2019s/Lab0.pdf · Get a visual overlay highlighting the major components of the UI Interactive playground Try essential

C 프로그램 실행(Cont’d)• Terminal->New terminal로 새로운 terminal창을 띄움• gcc를 사용하여 컴파일하여 실행파일을 생성함• gcc (c file이름) –o (실행할 파일 이름을 생성)

– Ex)gcc test.c –o test• ls(list)라는 명령어를 통해 지금 폴더안의 어떤 파일이 있는지 확인할 수 있음• ./(실행파일)를 사용하여 exe(실행파일)을 실행 할 수 있다.

• Ex) ./test• 이전에 작성한 Hello world가 출력 됨

18