In this tutorial, you will learn how to install a C compiler in Windows, Linux, and Mac operating systems.
What is a C compiler?
A compiler is a computer program that is built to convert high-level language code to machine language. We generally write C program English like language which computer does not understand.
To make the code understand to the computer we need to convert the code to binary code. The C compiler converts the human-readable code to binary code.
List of C Compiler for Windows
There are many C compilers available in the online market. Below are the most commonly used C compilers.
- Turbo C++
- Dev C++
- Minimalist GNU for Windows (MinGW)
- CCS C Compiler
- Portable C Compiler
- Code::Blocks
- Digital Mars C++ Compiler
- Intel C++
- IBM C++
- Oracle C++
- Visual C++ : Express Edition
C installation on Windows
There are many C compilers are available in the market. You can install any of the software given below.
- You can use MinGW.
- You can download Dev-C++ IDE to develop C and C++ applications.
- You can download Code::Blocks which is an open-source Integrated Development Environment.
C installation in Unix/ Linux
If you are using Unix/Linux operating system, then gcc C compiler should be preinstalled in your system. To check if the gcc compiler is installed or not just type gcc command as below:
$ gcc -v
By any chance if the compiler is not present in your system, you can get it installed using the following steps:
1) Open the terminal
2) For Red-Hat, Fedora users, type and execute this command
$ yum groupinstall 'Development Tools'
3) For Debian and Ubuntu users, type and execute the following command
$ sudo apt-get update $ sudo apt-get install build-essential manpages-dev
4) To verify that the gcc has been successfully installed on the machine as we discussed earlier, execute the following command.
$ gcc -v
C installation on MAC.
Xcode development environment came with GNU C/C++ compiler; You can install it from Apple’s website.
You can download Xcode from developer.apple.com/technologies/tools.