When compiling, you have to pass some new flags to let clang know that you want to use the gnu compiler collection (gcc) instead of msvc. In this article we will see that you can install clang/clang++ on windows with a single command. Check the full list of release packages at the bottom of this release page if you do not find.
By default, it uses the visual studio (msvc) toolchain as backend on windows (for linking, runtime, etc).
Open the visual studio installer community folder, click modify, and then add clang to install the program. Of course this can be disabled, but people like to have everything ready. For the best ide support in visual studio, we recommend using the latest clang compiler tools for windows. Download and install using the default settings.
You can use any web. If you don't already have the tools, you can install them by opening the visual. However, it still uses the old method that’s deprecated due to security. When you want to compile for native windows with clang + msvc.
Download links for common platforms will appear above once builds have completed, if they are available.
The command you run in step 2 will automatically download the key file and add clang apt repository into your system.