atmega8 pinout

I meant only that TCCR2 exists on the ATMega168 but not on the ATMega8. TCCR1 exists on both.

It appears that it does not compile on the '8 (following Riva's very appropriate advice) because the compiler is looking for TCCR2 amongst others. It does compile on the '168 where these exist.

If the sketch and library refer to PWM pins that are supported on the '8 (D9-11 I believe) then I agree - it should complie fine. It appears that something does not at the moment and the compiler is looking for registers etc that don't exist on the '8.