Use MPLAB C18 Compiler for PIC18 series...
Have lots of Library and the main thing is that it is FREE......
(with just a condition that the code generated will be having little bit more size than the purchased version)
Microchip's MPLAB IDE is free and if you are using the compilers in Lite mode they are also free. to quote from
**broken link removed** "The Lite compilers are freeware compilers provided as a low-cost tool for all purposes. These compilers have no time or memory limitations, however most code optimizations will be restricted."
Hence the Lite compilers (C18, C32, dsPIC, PIC32) should be suitable unless your application is time critical or memory critical (where you need the optimizations)
there is also plenty of code examples
**broken link removed**