'lcd' was not declared in this scope

I can't see where you've defined an lcd object.
The compiler can't either.