Introduction
The article Never Lose Install C++ Compilers on Windowswill guide you through the process of installing a C++ compiler on your Windows 10 computer.What is a C++ Compiler, and Why is it Important?
A compiler is a program that translates code written in a programming language (the source code) into another language (the object code) that a computer can understand.The C++ Compiler converts the C++ source code into an executable file.
The compiler takes the input, analyzes it, and outputs an executable file that can be run on the computer. The compiler is essential because, without it, there would be no way of executing the compiled program.
Never Lose Installing C++ Compilers on Windows
The MinGW compile
The MinGW compiler is a free and open-source tool for compiling and building applications. It is a part of the GNU Project, which aims to provide a complete and accessible set of tools for software development.
It is intended to be used on Windows, but it can also be installed on Linux and Mac OSX.
– To compile C/C++ programs from the command line- To make libraries available in your project
– To build your libraries- To build executables
Download MinGW compiler
Go to the website mingw-w64, scroll down to the download menu: click download, scroll down again to MingW-W64-builds, and click on the SourceForge.
Download MinGW compiler
Download the latest version of the MinGW 64 compiler.
Extract the zip file and name it MinGW.
Open the control panel, and pick system and security.
- Search for the environment keyword in the search bar.
- Click on System
- Click on the edit environment variable for your account.
*Click on the environment variable button from the advanced menu.
- In a box system variable, choose Path, then click edit.
- Click add new, then browse and copy past the directory of the pin from the mingw64 file located on the program files.
- Move up the new Path as you see in the image below.
Click 3 times Ok to save changes.
- From the left-down corner, type the command cmd.
- Type in the command prompt the following character, include the space: g++ –version
- Click enter
- You will see a screen like the following image show. You can notice the compiler version.
Conclusion
In conclusion, the MinGW compiler is an excellent tool for developers. It is free and open-source. It is also cross-platform compatible and can be used in Windows, Linux, and Mac OS X.