DEV Community

Using Clang++ and Make natively on Windows

This guide explains how to install Clang++ and Make on Windows using the MinGW-w64 project. The goal is to run these programs natively on Windows, which is faster than using emulation layers like Cygwin. To start, download the LLVM-MinGW package from the MinGW-w64 website, which includes the LLVM compilers, Make, and Python. Choose the correct package based on your processor architecture and C runtime library, and download the corresponding Zip file. Unpack the Zip file and move the folder to a convenient location, such as the top folder of the main drive C:\. Modify the Windows path variable to include the binary folder, and then test the installation by opening a command prompt and running "clang --version" and "mingw32-make --version". Be cautious when using different command prompts, as they may prioritize different folders when looking for binaries. To use Makefiles in Windows PowerShell, you may need to make Unix utilities available by adding the Git Bash binary folder to the Windows path variable. This allows you to run Unix commands like "touch --version" in Windows PowerShell. With these steps, you should be able to install and use Clang++ and Make on Windows.
favicon
dev.to
dev.to