I'm unsure what the "best" C++ compilers (ease of installation, updateability usability, supported C++ standard, code perf.) are on current Windows systems, not counting MSVC. MSys, MinGW, Gygwin, etc. ...
Do not forget that the microsoft stl (publicly available on github) is far more advanced in features and performances than what you get on other platforms (libstdc++...). You have whole teams well paid and dedicated full time to implement last c++ drafts.
all the modern windows toolchains use msvc standard C libraries, even the mingw ones. That's why msys2 offers both ucrt and msvcrt variants of mingw-w64-gcc and mingw-w64-clang.
They do use their own C++ standard library implementations though (not sure about the Clang that ships with Visual Studio though)
It's on the Winget package manager (the official application package manager for Windows) as LLVM. It's probably on others too, but keep in mind it may be listed as LLVM rather than Clang for some reason.
Note you will also need the Windows SDK. I haven't looked to see if that's on a package manager, and I don't know if it includes the MS STL or you have to install that too.
I just normally install the lot via the Visual Studio installer (not VS Code). VS 2022 is actually really good.
That's a common pattern: UNIX distributions package the compiler as "clang" half the time, "llvm" the other half of the time.
For people interested in cross-platform development, the inconsistency in package composition and naming is one more unnecessary inconvenience to manage.
I installed it via Visual Studio Installer, because I already had it on my system. Other options might be available, but I haven't personally tried them.
22
u/Trider12 Mar 01 '23
Clang. It's even available as an option in Visual Studio.