Object File

Object files are .o file. These are compiled file but cannot be executable.

They need to be link before executing.

gcc -c myfile.c

This will compile into myfile.o. And in order to link this file and create an exe we can do

gcc myfile.o -o myfile

As a result, it should convert myfile into an executable.

You can also link multiple .o file into an executable file:

gcc myfile.o myfile1.o myfile2.o -o myfile