Header files help the compiler to know that the function exists and the lib files help them find out where on the program is the function located. The linking happens after the compiler and so if you do not have the lib files you will get the linker errors.