Loading lessons...
C Compilers for Different Systems
C Compilers for Different Systems
There is more than one C compiler. Here is how to pick for your system.
The popular compilers
- GCC (the GNU Compiler Collection) - free, open source, works everywhere.
- Clang - high quality, popular on macOS, part of LLVM.
- MSVC (Microsoft Visual C++) - the Windows compiler inside Visual Studio.
Which one for what?
- Windows: MinGW gcc or Visual Studio (MSVC).
- macOS: clang (installed with Xcode command line tools).
- Linux: gcc, ready with the system package manager.
Online compilers
No compiler installed? Try free online editors:
- OnlineGDB
- Coliru
- Programiz
- etc. They compile and run all in the browser.
Verify
Whatever you pick, check that it works with the classic:
gcc --version
clang --version
TL;DR
- GCC is Linux/Windows-common; Clang is the macOS helper; MSVC is Visual Studio.
- Check your install with
gcc --version. - OnlineGDB enables you to practice without installing it.
- The compiler you choose doesn't change how you write C.