Explanation : The compiler only needs to have a declaration for something in order to compile a file into an object file, expecting that the linker (you might have heard these terms as Linker and Loader) can find the definition from another file. If no source file ever defines a symbol, but it is declared, you will get errors at link time complaining about undefined symbols.