• Articles
  • Comparison of popular compilers and IDEs
Published by
May 16, 2010 (last update: Sep 25, 2011)

Comparison of popular compilers and IDEs

Score: 3.4/5 (148 votes)
The Difference
People, especially beginners, often confuse the difference between a 'compiler' and an 'IDE'. This is likely because compilers co

Strictly speaking, a compiler is a program which translates high-level source code from one language into another, more low-level language. A C++ compiler, for example, takes C++ source code and translates it into the assembly language of the target platform.

Sometimes, however, we use the term compiler to refer to a compiler toolchain, which consists of (in the case of languages such as C and C++) a preprocessor, a translator, an assembler, and a linker. In this article, the term "compiler" will refer to the toolchain collectively, while the term translator will refer to the program which translates high-level source code into a different language. In the real world, people often use the terms interchangeably - sometimes compiler means translator and sometimes it means the entire toolchain.

The acronym IDE, in the context of software development, usually refers to an Integrated Development Environment. An Integrated Development Environment is exactly what it sounds like - an integrated environment for development. It usually consists of a text editor and a method of invoking the compiler. Most IDEs include extra features such as projects, debugger integration, code completion, find-and-replace, syntax highlighting and others.

There are many popular compilers, among them the GNU Compiler Collection (GCC) which includes gcc and g++ (the GNU C Compiler and GNU C++ Compiler) and Microsoft's Visual C and Visual C++ compilers (note: Visual C/C++ also refers to the IDE; when referring to the IDE the term "Visual C Studio" or "Visual C++ Studio" will be used instead). There are many other compilers of varying qualities, such as the Borland C/C++ compilers, the Intel C++ compiler and the OpenWatcom Compilers. We will focus on gcc and Visual C in this article as they are the most popular compilers.

  • Free/Open-Source -- gcc can be modified, derived or redistributed by anyone given that the modified/derivied/redistributed version remains licensed under the GNU General Public License (GPL)
  • Cross-platform -- as gcc is open source, it has successfully been ported to various platforms including Linux, Microsoft Windows and Mac OS. If you are a Linux user you almost certainly have gcc installed already. You may have to install g++ separately, in which case you should use your distribution's package manager or download the source code and compile it yourself. On Windows, you can find gcc in the MinGW and Cygwin packages.
  • Fast -- as a modern, optimizing compiler gcc produces relatively efficient code

Note: gcc and g++ should not be capitalized (to distinguish gcc from GCC).
Microsoft Visual C/C++
  • Free -- a version of Visual C/C++ is available for personal or commercial use from Microsoft's website.
  • Debugger -- Visual C/C++ is often acclaimed for it's powerful debugger.

Other compilers also exist. Among these are tcc (Tiny C Compiler), the OpenWatcom compiler and the Intel C++ Compiler. OpenWatcom is a cross-platform (Windows, MS-DOS, Linux and others) optimizing compiler which can produce 16-bit code (something gcc usually cannot do). The Intel C++ compiler provides very thorough optimization. tcc is known for being very fast and small, although it has limited optimization capabilities.

A recent and very interesting compiler which has emerged recently is clang. clang is a "front-end" for the C family of languages for LLVM. clang has many improvements over current compilers, such as enhanced error reporting, compatibility and performance enhancements. See http://clang.llvm.org/ for more information.

Popular IDEs include

  • Dev-C++ (note: you are recommended to use wxDev-C++ instead as Dev-C++ has not been updated for 5 years)
  • Code::Blocks
  • Netbeans
  • Microsoft Visual Studio
  • Eclipse
  • KDevelop

  • Regarding Visual C/C++ -- This is now free for commercial use (PGP Protector)
  • Various corrections and suggestions (helios)
  • Inclusion of clang/LLVM (softweyr)