2023年5月13日 星期六

CPP Dev on Windows on 2023

https://github.com/HO-COOH/CPPDevOnWindows
https://gitlab.com/etoricky/windows-10-clang-with-catch2

Operate on 2023-05-13

1. Install Clang

https://www.msys2.org/
MSYS2 MSYS
pacman -Syu  # Sync download update
pacman -S mingw-w64-x86_64-clang mingw-w64-x86_64-clang-tools-extra
pacman -S mingw-w64-x86_64-make
pacman -S mingw-w64-x86_64-gdb
pacman -S mingw-w64-x86_64-ninja
System Environment > Path > C:\msys64\mingw64\bin
pacman -S mingw-w64-x86_64-libc++

C:\Users\user>clang++ --version
clang version 16.0.2
Target: x86_64-w64-windows-gnu
Thread model: posix
InstalledDir: C:/msys64/mingw64/bin

C:\Users\user>gcc --version
gcc (Rev5, Built by MSYS2 project) 13.1.0
Copyright (C) 2023 Free Software Foundation, Inc.

C:\Users\user>ninja --version
1.11.1

2. Install CMake

cmake-3.26.3-windows-x86_64.msi
choose Add CMake to the system PATH for all users

C:\Users\user>cmake --version
cmake version 3.26.3

3. CLion

CLion-2023.1.2.exe
File > Settings > Build, Execution, Deployment > Toolchains
NameL MinGW
Toolset: C:\msys64\mingw64
CMakeL Bundled v3.25.2
Build Tool: C:\msys64\mingw64\bin\ninja.exe
C Compiler: C:\msys64\mingw64\bin\clang.exe
C++ Compiler: C:\msys64\mingw64\bin\clang++.exe
Debugger: MinGW-w64 GDB

4. VS Code

VSCodeUserSetup-x64-1.78.2.exe

Extension:
Microsoft C/C++ as Microsoft Language Server
dont install clangd
CMake, for cmake scirpts syntax highlight
CMake Tools, for actually running CMake
Settings > Cmake:Generator to MinGW Makefiles
Settings > Palette > CMake: Quick Start > Clang > apple > Executable
now can debug, syntax highlighting, auto complete

C/C++ Extension Pack v1.3.0

C:\Users\user>code --version
1.78.2

5. Git

Git-2.40.1-64-bit.exe

C:\Users\user>git --version
git version 2.40.1.windows.1


Done, can build

but  missing ctest, google test, clang-format, clang-tidy, llvm code coverage






End

沒有留言:

張貼留言

2023 Promox on Morefine N6000 16GB 512GB

2023 Promox on Morefine N6000 16GB 512GB Software Etcher 100MB (not but can be rufus-4.3.exe 1.4MB) Proxmox VE 7.4 ISO Installer (1st ISO re...