 <p>kaylum answered perfectly when you split your project in more than a source file (the .c files) you have to compile them all into an object file (the .o files) then the compiler can merge your object file in an exec file.</p> <p>the undefined reference error means that your program use something that has not been compiled.</p> <p>gcc func.c main.c -o this option specify that the two source file will be compiled in the same object file so there will the reference of the function that you call in your program.</p>