The comment in line 1 says 16F877A. I know better than to rely on comments but it says what it says...
There are other header files besides the one you are using.
More registers are defined in the official Microchip header file:
pic18f4520.h
http://digsys.upc.es/ed/CSD/units/Ch4/U4_06/pic18f4520.hNote that this file should not be included directly. The comment says to include htc.h and even then you would still have to find /peripheral/pconfig.h I did notice that PORTAbits is defined in this file, I didn't pursue the other undefined symbols.
You're going to have to read the documentation for your compiler or find sample projects that are known to work with the compiler.
What you don't want to do is try to create your own header file.
Look through the subdirectories for your compiler and see what you find. There is usually a header subdirectory and it usually has a LOT of files - most of which you don't care about.