개발 기록/Tools & 기타

윈도우에서 C언어 사용하기 - Visual C++ Express Edition

JasonM 2023. 5. 18. 22:14
반응형

아래 링크에서 먼저 visual C++을 다운받은 후 설치를 한다.

 

http://msdn.microsoft.com/vstudio/express/visualc/

 

Visual Studio: IDE and Code Editor for Software Developers and Teams

Visual Studio dev tools & services make app development easy for any developer, on any platform & language. Develop with our code editor or IDE anywhere for free.

visualstudio.microsoft.com

 

설치 완료후 C프로그램으로 사용하기, not C++

 

- File->New->Project 로 새로운 프로젝트 생성

 

- From the "Project types" tree, select "Win32". Select the "Win32 Console Application" template.

프로젝트 타입에서 Win32 콘솔 어플리케이션 선택.

 

- Name the project and select a folder to save it in. then Click Ok.

 

- In the resulting window, click "Next >".

 

- Check the "Empty Project" box.

반드시 Empty  Project를 체크해야 된다.. (C프로그램을 위해서는 반드시 체크)
Click Finish.

 

- 프로젝트가 생성되면 카테고리 Tree의 Add 옵션을 통해 코드/헤더 파일(*.c/*.h)을 생성하거나 추가할 수 있다.

 새 .c 파일을 생성할 경우, C++ 타입으로 선택 후, 파일명은 filename.c로 지정해야한다.

 

- 마지막으로

project properties -> C/C++ -> Advanced -> Complie As C++ Code 를 Complie As C Code 로 변경

 

 

컴파일 방법

F7 을 눌러 build

Ctrl + F5 를 눌러 Run.

 

 

반응형