Brilliant, thank you DrG I'll have a go.
BTW when you remark that a couple of functions are not used - does this mean that all the functions in LCD.c are compiled not just the ones that are called or is it just that you've brought LCD.c into the main file in this case?
Not sure if that change made the program run, but I wanted to respond with respect to some of the other posts...I think that you have been given some decent advice and, in general I agree with it completely.
When you are learning PICs, and I am assuming that you are in such a stage because your OP talks about doing an exercise from a book, one of the most important aspects to learn is that there are MANY PIC chips and MANY have been around for a while. That situation can easily result in book examples not "working" any more and it can be very frustrating.
So, for instance, the example in your book may have fit and worked just fine at one time, but not anymore without some changes. Perhaps earlier versions of XC8 used, as a default, the smaller 24-bit floating point library but newer versions, as a default, use the larger 32-bit versions (note that you can even see a message about the larger 32 bit FP libraries in the output). There is no way the book example knew that at the time and for the person who later goes through the example, it can be incredibly frustrating.
There is hope... I have learned to not ignore warnings (unless I completely understand the situation) and to automatically search on errors that puzzle me.
Also, sometimes it is ok to avoid one size fits all "rules". Several times you asked about unused functions and whether they are compiled (thus adding to the program size). The answer is to check yourself - somebody mentioned researching the subject - I agree completely. In this case, comment out the unused functions and compare the program sizes. You will also find out very quickly whether there are some dependencies that exist.
You have probably gained some appreciation for how important understanding linker messages and mapping can be.
Finally, not using floating point libraries unless you really need to use them is probably sound advice since they take up so much space. That may seem daunting at first, but it is a good point to, at least, park in your mind even if you don't stop right now and figure out how to do something without the floating point libraries.
End of my two cents
![Smiley :)](https://www.eevblog.com/forum/Smileys/default/smiley.gif)