Setup works in example sketch, not in my sketch

This segment of code compiles and works fine in an example LCD sketch. When I copy and paste it into my sketch, it yields an error: 'lcd' was not declared in this scope. What might I be doing wrong?

void setup()
{
//define pin 10 as output
pinMode (bl_level, OUTPUT); 
// set start bl_level to 127 (50%)
analogWrite (bl_level, brightness);
lcd.begin(16, 2);  // this line triggers the error.
lcd.setCursor(0,0); 
lcd.print("Push the buttons");
}

Did you #include the library for the LCD?

Show ALL of your code.

Did you include the line "earlier" in the example sketch that probably looks something like:

    LiquidCrystal lcd(rs, en, d4, d5, d6, d7);

in your copy and paste?

westfw got it: somehow I missed that. thanks