I added lcd.c file
You already 'include' lcd.c in main.c which is not a good idea as you just found out. You effectively did a cut/paste of lcd.c into main.c where you include it, which means the lcd code knows about the pin defines.
Adding lcd.c to the project means the compiler now also compiles lcd.c- keep in mind every c file is compiled as a separate 'unit' and knows nothing about other c files. In this case lcd.c knows nothing about the pin defines so you get the errors. You are also duplicating all lcd.c code, so will also get other errors even if you had the defines info available.
You can probably find many tutorials on how to organize code. Or read other good code for examples.
There are many ways to go about it, but one way to do it (simplified version)-
//global.h
#define _XTAL_FREQ 4000000
//anyone needing to know the cpu freq can just include this file
//any other global info here which doesn't really fit anywhere else
//lcd.h
void Lcd4_Init();
void Lcd4_Write_String(char *a);
//any other info others may need to use the lcd
//but nothing more- no one needs to know how we put the data out
//or what pins we use
//lcd.c
#include global.h //we need cpu freq for delays
#include lcd.h
#define RS RC0
#define EN RC1
//etc.
//we can set pins as output in our init, no need for others to do this
//lcd functions here
//main.c
#include "global.h"
#include "lcd.h"
//we can now init and use the lcd
two c files- main.c and lcd.c will now be in our project, both compiled separately, both having only the info they need to compile
you will also have to know about include guards to prevent unintended multiple inclusion of header files- if using mplabx/xc8, when creating a new header in the ide it will create the guards for you