With XC8/16/32 compilers, you only need XC.h as the processor type is obtained from the IDE and then XC8 /16/32 then produces an AS file ( assembly startup ) which defines the processor..
Most compilers used to allow ( and still do ) the inclusion of the correct header... XC8 and MikroC both do not need this to be defined..
So in case if i import any sample project i should select the correct controller for that project then it automatically includes that header. Am i correct?
Like I said... XC8 and MikroC allow automatic processor selection... I can't assume you are using a specific compiler / IDE.. MPIDE will pass the processor type to the compiler.. If you just include XC.H then it will auto detect. However! You can just specify the header by name.. ie.. #include <p24Hxxxx.h> and it will be found.. This is to simplify the coding process to the masses..