Jan 1, 2014 (last update: Jan 1, 2014)
Difference between an IDE and Compiler
Score: 3.7/5 (175 votes)
Hello people of CPlusPlus.com and of the interwebs, today I'm going to clear up your confusions of "What is an IDE?" and "What is a compiler?". If you ask a person "What compiler do you use?", the general answers would be:
But are they compilers? Nooooo. Just because they come with a compiler doesn't mean that it is a compiler.
IDE - Integrated Development Environment
So what is an IDE? Well in simple terms, an IDE is the software that helps you write your code, provide code completion, code suggestions and those other neat stuff. Yep that's what you call an IDE. So does Code::Blocks and Dev-C++ do those things? They sure do, therefore, they are IDEs and not Compilers. But you may say "Hey but they let me compile my code too?". Do they really or do they use something else?
What is this compiler thing that most people ask about? It too is a software or program. But it doesn't do the neat stuff that the IDE does but it is very very important. Without it your IDE won't be able to produce the runnable programs from the source codes you write. What a compiler does is it takes the source code that you write and converts it to machine code or some other low-level language (such as assembly code). If you want a formal definition:
The name "compiler" is primarily used for programs that translate source code from a high-level programming language to a lower level language (e.g., assembly language or machine code). The most common reason for wanting to transform source code is to create an executable program.
So how does IDEs like Code::Blocks or Dev-C++ compile your code? They use compilers. Code::Blocks uses MinGW Compiler which is a port of the GCC set of compilers. Dev-C++ uses that same compiler too but the version may vary. Its possible to set up your IDE to use a different compiler such as Intel C++ Compiler too but it varies from IDE to IDE so I won't cover that.
So have a good day and hope you understand what those two terms mean as a figment of the programming world.