What's the difference between Building and Compiling.
4 Answers
Compiling is part of a build process.
A build process can include testing, packaging and other activities apart from compilation.
- 53,734
"Building" is a fairly general term, and it can refer to anything that is needed to go from editable source material (source code, scripts, raw data files, etc.) to a shippable software product. Building can (and usually does) involve several steps, such as pre-processing, compiling, linking, converting data files, running automated tests, packaging, etc.
"Compiling" is more specific, and almost invariably refers to a process that takes source code as its input, and outputs something runnable, typically machine code for either a physical or virtual machine, or source code in a different language.
- 52,936
These terms are often used interchangeably, but I would differentiate them in the following way:
- Building is done when preparing an application for release, which includes compiling, packaging, testing, etc.
- Compiling is done at any time the compiler is involved in translating programming language code to machine code.
Thus, compiling is really a subset of building.
- 8,869
Compiling is done by compiler, build can be more complex process.
Eg. in C++ to make a build of a project you need preprocessor (preprocessing of source files); compiler (compiling of source files); linker (merging everything into executable - compiled code, icons, strings, other resources together)
So generally compiling is translating code written in one language to another (eg. machine code).
- 2,892