Programming
[VS Code & WSL] C/C++ #include 지시문에서 suggestion 항목들 안보이는 문제
온별파파
2021. 12. 27. 22:30
반응형
Visual Studio Code에서 Windows Subsystem for Linux와 연동하여 C/C++ 코드를 작성할 때, ctrl + p를 눌러서 제안되는 항목들을 보려했지만, 아래 사진처럼 No suggestions이라고 발생합니다.

해결책
- Ubuntu package들이 update되지 않아 발생하는 문제로 command prompt에 아래 명령어를 입력하여 package를 update
sudo apt-get update
- command prompt에 아래 명령어를 입력하여 GNU compiler tools and the GDB debugger 설치
sudo apt-get install build-essential gdb
- 이후 VS code를 재시작하면 아래처럼 suggestion list를 볼 수 있음

참고
- Using C++ and WSL in VS Code (https://code.visualstudio.com/docs/cpp/config-wsl)
반응형