Object File

When we program in a high level language like C or C++ we write C/C++ code which other humans can understand.

For the computer to run this code it needs to use a C/C++ compiler program which reads the code and translates into the machine code of the CPU that we are compiling for. The machine is low level instructions understood by the CPU - the machine code will be different for a Intel x86 processor versus a ARM CPU used in say an iPhone or a modern Macbook computer.

An object file cannot be run by itself. It’s an intermediate file that is used as an input into a “linker” program which combines many object files together usually into an executable program.

In POSIX these files typically end in *.o and in windows *.obj just to keep us on our toes.

Related pages