Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the difference between compile code and executable code?

People also ask

What is an executable code?

(3) Computer software executable code The term “computer software executable code” means— (A) any object code, machine code, or other code readable by a computer when loaded into its memory and used directly by such computer to execute instructions; and (B) any related user manuals.

What is compile code?

Compile is the creation of an executable program from code written in a compiled programming language. Compiling allows the computer to run and understand the program without the need of the programming software used to create it.

What is compile and execute programs?

A compiler is an executable program that takes program source code (text) as input and translates it into an executable program (binary machine code) that it writes into a file as output. That executable program can then be run to process input data and generate output according to whatever we wrote our program to do.


Compiling is the act of turning source code into object code.

Linking is the act of combining object code with libraries into a raw executable.

Building is the sequence composed of compiling and linking, with possibly other tasks such as installer creation.

Many compilers handle the linking step automatically after compiling source code.


From wikipedia:

In the field of computer software, the term software build refers either to the process of converting source code files into standalone software artifact(s) that can be run on a computer, or the result of doing so. One of the most important steps of a software build is the compilation process where source code files are converted into executable code.

While for simple programs the process consists of a single file being compiled, for complex software the source code may consist of many files and may be combined in different ways to produce many different versions.


A build could be seen as a script, which comprises of many steps - the primary one of which would be to compile the code. Others could be

  • running tests
  • reporting (e.g. coverage)
  • static analysis
  • pre and post-build steps
  • running custom tools over certain files
  • creating installs
  • labelling them and deploying/copying them to a repository

They often are used to mean the same thing. However, "build" may also mean the full process of compiling and linking a whole application (in the case of e.g. C and C++), or even more, including, among others

  • packaging
  • automatic (unit and/or integration) testing
  • installer generation
  • installation/deployment
  • documentation/site generation
  • report generation (e.g. test results, coverage).

There are systems like Maven, which generalize this with the concept of lifecycle, which consists of several stages, producing different artifacts, possibly using results and artifacts from previous stages.


From my experience I would say that "compiling" refers to the conversion of one or several human-readable source files to byte code (object files in C) while "building" denominates the whole process of compiling, linking and whatever else needs to be done of an entire package or project.