Thinking about NetBeans or Eclipse I was wondering how an IDE compiles code when you click run. Does it open a command line in the background to compile it? How exactly does it work?
-
For which programming language? On which OS? But yes, compilers are command line programs mostly – Basile Starynkevitch Mar 10 '15 at 20:56
3 Answers
Each IDE will have it's own approach for how they actually achieve compilation. Usually they will have their own compilers or wrappers around existing compilers to which they delegate actual compilation.
Eclipse comes with a built in compiler of its own:
How does Eclipse compile classes with only a JRE?
I don't actually personally know much about how other ones achieve the compilation in any detail; somebody else may provide a better answer in that regard.

- 1
- 1

- 1,609
- 1
- 9
- 12
IDEs use compilers. That's actually the difference between them. For instance, Code::Blocks uses MinGW Compiler which is a port of the GCC set of compilers.

- 2,130
- 3
- 26
- 38
Every compiler has its own method, some use their own wrappers and ports for known compilers. (See Codeblocks)
I also noticed that some basic IDEs out there, just run the simple command line using gcc
, clang
, etc and let you pass parameters from an option window.

- 549
- 1
- 11
- 23