 <p>As suggested in Matthieu M.'s comment, it is the <strong>linker job</strong> to find the right "function" at the right place. Compilation steps are, roughly:</p> <ol> <li>The compiler is invoked for each cpp file and translate it to an object file (binary code) with a <strong>symbol table</strong> which associates function name (names are mangled in c++) to their location in the object file.</li> <li>The linker is invoked only one time: whith every object file in parameter. It will resolve function call location from one object file to another thanks to <strong>symbol tables</strong>. One main() function MUST exist somewhere. Eventually a binary executable file is produced when the linker found everything it needs.</li> </ol>