Don't do this or you'll enter the unpleasant lands of precompiled headers.
Undefined reference error means that you have not defined the function that is mentioned in the error message.
This means that you have not placed the code for the function in a .c file that is being compiled and linked.