I can't help with the specific sqlite3_create_function but the overall description of your problem would match with a version conflict between the header you use during compile and the library you use at runtime. That you have to add sqlite3.c to your project in order for the linker to find the symbol may indicate that you mix different calling conventions - the linker looks for a symbol with different marshaling. Depending on call parameters and other activities on the stack an application may survive the function entry but die with obscure symptoms later on.
So, double check if the sqlite header and implementation belong together.