Programming/Tools

vscode에서 c/c++ 실행을 헤메다가 해결하다

Saans 2021. 10. 31. 14:39

호기롭게 파이썬처럼 잘 작동하겠거니 하고 visual studio code에 c 설치하고 

#include <stdio.h>

int main() {

  printf("Hello, World! \n");

  return 0;

}

 

쳤는데 

#include 오류가 검색되었습니다. includepath를 업데이트하세요

이 친구를 만났다

 

결론은 이 분이 블로그에 정말 잘 설명해주셔서 따라하면 된다

중간에 1. setting.json 은 빈칸에 경로 붙여넣기하면 된다

 

https://miaow-miaow.tistory.com/125

 

[VS Code] C/C++ 환경구성 - 1

목표: VS Code에서 C/C++ 환경 구성하기 요약 C/C++ 확장팩 다운로드 Code Runner 다운로드(for Debugging) MinGW 다운로드(for Compile) 컴파일러를 위한 환경설정(Path) 안녕하세요 냥장판 입니다 VS Code에서..

miaow-miaow.tistory.com

여차저차 찾아서 MinGW환경구성까지 마친 분들은 여기서부터 보시면 된다

https://miaow-miaow.tistory.com/126

 

[VS Code] C/C++ 환경구성 - 2

목표: VS Code에서 C/C++ 환경 구성하기 요약(지난 게시글) C/C++ 확장팩 다운로드 Code Runner 다운로드(for Debugging) MinGW 다운로드(for Compile) 컴파일러를 위한 환경설정(Path) 2020/03/11 - [놀고있네/VS..

miaow-miaow.tistory.com

정말 감사합니다

 

 

 

+ 노트북에 깔다가 #.exe 파일이 안뜬다고 launch.json파일 열라는 에러 떠서 참고한 페이지

https://stackoverflow.com/questions/47872250/cant-compile-code-launch-program-program-path-does-not-exist

 

Can't compile code "launch: program does not exist "

I have simple console application in C++ that I succeed to compile with Visual Studio. I wanted to try Visual Studio Code so I copied the directory to the computer with Visual Studio Code instal...

stackoverflow.com