I can't provide an exact solution since you haven't posted complete code but I'll have a try anyway.
In C++, the compiler must know about a function before it is called. For this reason you can add a "function prototype" which is simply a declaration of the function signature. This prototype tells the compiler "somewhere in my code I'm going to define this function". That's enough for the compiler.
The Arduino IDE automatically adds function prototypes to your sketch for any functions that don't have one already. Generally this works very reliably but in some rare cases function prototype generation is not done correctly or fails altogether. The solution is to simply add function prototypes for any problematic functions manually near the top of your sketch, before their first reference in the code.