I really can not help you with that mcu, but I can help you with the right direction, pic18 series app notes from microchip contain the can software layer but they are assembly, and not C18 or xc8 or hitech-c..

Anyway you should read them : Microchip AN853 and AN853 sourcecode

If you want to take a look at a code, here you have can driver based on the can open for C30 compiler.

Maybe you can build your own from this source, I really can't help you witch pic18 mcu's.