Compiling and Building program in C++

By | February 19, 2024

C++ uses Compiler to compiler and check errors before run the program, else erroneous C++ program can not be run. If there is any error in the program, then you have to remove those errors by correcting program. Then you can run the program.

Compilation

To compiler program, there are various compilers available depending on your operating system.

Note –
Most of the operating systems does not contain a compiler, so we have to install it later.

These are various compiler as given below:

  1. GCC, the GNU Compiler Collection g++
  2. clang: a C language family frontend for LLVM clang++
  3. MSVC, Microsoft Visual C++ (included in Visual Studio) visual – C++
  4. C++Builder, Embarcadero C++ Builder (included in RAD Studio) C++ builder

You need to check official manual of appropriate compiler, to learn how to compile and run a C++ program on that compiler.

This article is contributed by Raju Kumar. If you would like to contribute, you can also mail your article to raju.cplusplus@gmail.com. Please suggest your improvement for this article if you find anything incorrect.

Author: Mithlesh Upadhyay

I hold an M.Tech degree in Artificial Intelligence (2023) from Delhi Technological University (DTU) and possess over 4 years of experience. I worked at GeeksforGeeks, leading teams and managing content, including GATE CS, Test Series, Placements, C, and C++. I've also contributed technical content to companies like MarsDev, Tutorialspoint, StudyTonight, TutorialCup, and Guru99. My skill set includes coding, Data Structures and Algorithms (DSA), and Object-Oriented Programming (OOPs). I'm proficient in C++, Python, JavaScript, HTML, CSS, Bootstrap, React.js, Node.js, MongoDB, Django, and Data Science.