1. Build Tools 설치
Download Visual Studio Tools - Install Free for Windows, Mac, Linux
Download Visual Studio IDE or VS Code for free. Try out Visual Studio Professional or Enterprise editions on Windows, Mac.
visualstudio.microsoft.com
2. MSYS2 설치
MSYS2
Software Distribution and Building Platform for Windows
www.msys2.org
3. CMake 설치
CMake - Upgrade Your Software Build System
CMake is a powerful and comprehensive solution for managing the software build process. CMake is the de-facto standard for building C++ code, with over 2 million downloads a month.
cmake.org
OR
pacman -S mingw-w64-ucrt-x86_64-cmake
4. Tool Chain 설치
pacman -S --needed base-devel mingw-w64-ucrt-x86_64-toolchain
각각의 환경에 대한 차이는 https://www.msys2.org/docs/environments/ 을(를) 참고해주세요
5. 확장기능 설치
C/C++ - Visual Studio Marketplace
Extension for Visual Studio Code - C/C++ IntelliSense, debugging, and code browsing.
marketplace.visualstudio.com
clangd - Visual Studio Marketplace
Extension for Visual Studio Code - C/C++ completion, navigation, and insights
marketplace.visualstudio.com
CMake Tools - Visual Studio Marketplace
Extension for Visual Studio Code - Extended CMake support in Visual Studio Code
marketplace.visualstudio.com
6. VSCode 설정
settings.json
"clangd.arguments":
[
"--query-driver=c:/msys64/ucrt64/bin/gcc.exe",
"--query-driver=C:/msys64/ucrt64/bin/gcc.exe",
"--query-driver=c:/msys64/ucrt64/bin/clang++.exe",
"--query-driver=C:/msys64/ucrt64/bin/clang++.exe",
],
"clangd.checkUpdates": true,
"clangd.onConfigChanged": "restart",
"C_Cpp.intelliSenseEngine": "disabled",
launch.json
{
"configurations":
[
{
"name": "UCRT",
// mandatory
"type": "cppdbg",
"request": "launch",
// current working directory
"cwd": "${workspaceFolder}",
// full path to the executable
"program": "${command:cmake.launchTargetPath}",
},
{
"name": "MSVC",
// mandatory
"type": "cppvsdbg",
"request": "launch",
// current working directory
"cwd": "${workspaceFolder}",
// full path to the executable
"program": "${command:cmake.launchTargetPath}",
},
],
"version": "0.2.0",
}
Optional
판올림
pacman -Suy
clang 설치
pacman -S mingw-w64-ucrt-x86_64-clang
LLD 설치
pacman -S mingw-w64-ucrt-x86_64-lld
'프로그래밍 > C&C++' 카테고리의 다른 글
the rule of 0/3/5 (2) | 2025.03.18 |
---|---|
String & SSO (3) | 2025.02.17 |
Union & Bit-field (0) | 2025.02.17 |
Struct Padding (8) | 2025.02.13 |
Unicode (1) | 2025.01.19 |