compile ok for Arduino Pro Mini 328 but not for Pro Mini 168?

Hi, why does this program (from https://www.instructables.com/id/Arduino-Sleep-and-Wakeup-Test-With-DS3231-RTC/) compile ok for a Pro Mini 328 but not for a Pro Mini 138?

#include <Wire.h>
#include <RTClibExtended.h>
#include <LowPower.h>

#define wakePin 2    //use interrupt 0 (pin 2) and run function wakeUp when pin 2 gets LOW
#define ledPin 13    //use arduino on-board led for indicating sleep or wakeup status

RTC_DS3231 RTC;      //we are using the DS3231 RTC

byte AlarmFlag = 0;
byte ledStatus = 1;

//-------------------------------------------------

void wakeUp()        // here the interrupt is handled after wakeup
{
}

//------------------------------------------------------------

void setup() {
  //Set pin D2 as INPUT for accepting the interrupt signal from DS3231
  pinMode(wakePin, INPUT);

  //switch-on the on-board led for 1 second for indicating that the sketch is ok and running
  pinMode(ledPin, OUTPUT);
  digitalWrite(ledPin, HIGH);
  delay(1000);

  //Initialize communication with the clock
  Wire.begin();
  RTC.begin();
  RTC.adjust(DateTime(__DATE__, __TIME__));   //set RTC date and time to COMPILE time
  
  //clear any pending alarms
  RTC.armAlarm(1, false);
  RTC.clearAlarm(1);
  RTC.alarmInterrupt(1, false);
  RTC.armAlarm(2, false);
  RTC.clearAlarm(2);
  RTC.alarmInterrupt(2, false);

  //Set SQW pin to OFF (in my case it was set by default to 1Hz)
  //The output of the DS3231 INT pin is connected to this pin
  //It must be connected to arduino D2 pin for wake-up
  RTC.writeSqwPinMode(DS3231_OFF);

  //Set alarm1 every day at 18:33
  RTC.setAlarm(ALM1_MATCH_HOURS,00, 33, 18, 0);   //set your wake-up time here
  RTC.alarmInterrupt(1, true);
}

//------------------------------------------------------------

void loop() {

  //On first loop we enter the sleep mode
  if (AlarmFlag == 0) {
    attachInterrupt(0, wakeUp, LOW);                       //use interrupt 0 (pin 2) and run function wakeUp when pin 2 gets LOW 
    digitalWrite(ledPin, LOW);                             //switch-off the led for indicating that we enter the sleep mode
    ledStatus = 0;                                         //set the led status accordingly
    LowPower.powerDown(SLEEP_FOREVER, ADC_OFF, BOD_OFF);   //arduino enters sleep mode here
    detachInterrupt(0);                                    //execution resumes from here after wake-up

    //When exiting the sleep mode we clear the alarm
    RTC.armAlarm(1, false);
    RTC.clearAlarm(1);
    RTC.alarmInterrupt(1, false);
    AlarmFlag++;
  }

  //cycles the led to indicate that we are no more in sleep mode
  if (ledStatus == 0) {
    ledStatus = 1;
    digitalWrite(ledPin, HIGH);
  }
  else {
    ledStatus = 0;
    digitalWrite(ledPin, LOW);
  }

  delay(500);
}

Don't you think it would be a lot easier to figure out if we had the error messages?

I am so sorry!

Here is the verbose error output:

In file included from C:\Users\Mysafety\Google Drive\documents\Arduino\libraries\Low-Power\LowPower.cpp:32:0:

C:\Users\Mysafety\Google Drive\documents\Arduino\libraries\Low-Power\LowPower.cpp: In member function 'void LowPowerClass::powerExtStandby(period_t, adc_t, bod_t, timer2_t)':

C:\Users\Mysafety\Google Drive\documents\Arduino\libraries\Low-Power\LowPower.cpp:980:18: error: 'SLEEP_MODE_EXT_STANDBY' was not declared in this scope

    lowPowerBodOn(SLEEP_MODE_EXT_STANDBY);

                  ^

C:\Users\Mysafety\Google Drive\documents\Arduino\libraries\Low-Power\LowPower.cpp:980:4: note: in expansion of macro 'lowPowerBodOn'

    lowPowerBodOn(SLEEP_MODE_EXT_STANDBY);

    ^

C:\Users\Mysafety\Google Drive\documents\Arduino\libraries\Low-Power\LowPower.cpp:985:17: error: 'SLEEP_MODE_EXT_STANDBY' was not declared in this scope

   lowPowerBodOn(SLEEP_MODE_EXT_STANDBY);

                 ^

C:\Users\Mysafety\Google Drive\documents\Arduino\libraries\Low-Power\LowPower.cpp:985:3: note: in expansion of macro 'lowPowerBodOn'

   lowPowerBodOn(SLEEP_MODE_EXT_STANDBY);

   ^

Bibliotheek Wire op versie 1.0 in map: C:\Users\Mysafety\Google Drive\documents\Arduino\libraries\Wire  wordt gebruikt
Bibliotheek RTClibExtended op versie 1.0.0 in map: C:\Users\Mysafety\Google Drive\documents\Arduino\libraries\RTClibExtended  wordt gebruikt
Bibliotheek Low-Power op versie 1.6 in map: C:\Users\Mysafety\Google Drive\documents\Arduino\libraries\Low-Power  wordt gebruikt
exit status 1
Fout bij het compileren van board Arduino Pro or Pro Mini

I found this: SLEEP_MODE_EXT_STANDBY not declared on ATMega168 · Issue #14 · rocketscream/Low-Power · GitHub
It has to do with this issue but I would not know how to solve this?

brice3010:
I found this: SLEEP_MODE_EXT_STANDBY not declared on ATMega168 · Issue #14 · rocketscream/Low-Power · GitHub
It has to do with this issue but I would not know how to solve this?

Did you see rocketscream’s comment about NOT using the code on a device with an AtMega168 chip? And yet, here you are trying to…

SOLVED.

I added this to the LowPower.h

#if defined (AVR_ATmega168)
#define SLEEP_MODE_EXT_STANDBY SLEEP_MODE_STANDBY
#endif

Why was this not resolved, this issue was brought up on July 30 2015?
I opened a new issue (#45) SLEEP_MODE_EXT_STANDBY not declared on ATMega168 · Issue #45 · rocketscream/Low-Power · GitHub

PaulS:
Did you see rocketscream's comment about NOT using the code on a device with an AtMega168 chip? And yet, here you are trying to...

No sorry, I had overlooked that. But then why did I get this solved by adding a few lines to LowPower.h and is this not implemented?
Because now I can get it compiled for 168P.

brice3010:
No sorry, I had overlooked that. But then why did I get this solved by adding a few lines to LowPower.h and is this not implemented?
Because now I can get it compiled for 168P.

You can get it compiled sure. But that's a hack, not a fix. So they're not going to put that in the official version. Now you've got a define constant that secretly doesn't do what it says it does. That's OK for you since you know you hacked it. But it's not OK to put that out for people to download and try to use without knowing that one define constant is wrong.

SOLVED.

Worked-around, you mean. I don’t know, but I suspect that SLEEP_MODE_EXT_STANDBY and SLEEP_MODE_STANDBY are supposed to be two different modes. All that you are doing is making them the same mode.

Delta_G:
You can get it compiled sure. But that's a hack, not a fix. So they're not going to put that in the official version. Now you've got a define constant that secretly doesn't do what it says it does. That's OK for you since you know you hacked it. But it's not OK to put that out for people to download and try to use without knowing that one define constant is wrong.

Not even in the 168P?

brice3010:
Not even in the 168P?

What do you mean? It doesn't matter what chip. Nobody wants defines that are secretly redefined to some other define that isn't the same thing. That leads people to think that they can do things that won't work. Then developers have to deal with all the "Why doesn't SLEEP_MODE_EXT_STANDBY work on my 168. It acts the same as SLEEP_MODE_STANDBY" questions.

Delta_G:
What do you mean? It doesn't matter what chip. Nobody wants defines that are secretly redefined to some other define that isn't the same thing. That leads people to think that they can do things that won't work. Then developers have to deal with all the "Why doesn't SLEEP_MODE_EXT_STANDBY work on my 168. It acts the same as SLEEP_MODE_STANDBY" questions.

I try to understand you, but I think I am missing something.
Page 41 of the 660 page dataheet it says:

10.7 Standby Mode
When the SM2...0 bits are 110 and an external crystal/resonator clock option is selected, the SLEEP instruction
makes the MCU enter Standby mode. This mode is identical to Power-down with the exception that the
Oscillator is kept running. From Standby mode, the device wakes up in six clock cycles.
ATmega48A/PA/88A/PA/168A/PA/328/P [DATASHEET] 42
Atmel-8271J-AVR- ATmega-Datasheet_11/2015
10.8 Extended Standby Mode
When the SM2...0 bits are 111 and an external crystal/resonator clock option is selected, the SLEEP instruction
makes the MCU enter Extended Standby mode. This mode is identical to Power-save with the exception that
the Oscillator is kept running. From Extended Standby mode, the device wakes up in six clock cycles.

I seem to miss the difference?

I found some more info: Arduino AtMega328p low power consumption - disk91.com - the IoT blogdisk91.com – the IoT blog

But where does it say extended standby is not supported by the 168P?

PaulS:
Did you see rocketscream's comment about NOT using the code on a device with an AtMega168 chip? And yet, here you are trying to...

He was refering to the Atmega168. I refer to the 168P as I clearly stated.

The 168P DOES provide for extended standby.

PaulS:
Worked-around, you mean. I don't know, but I suspect that SLEEP_MODE_EXT_STANDBY and SLEEP_MODE_STANDBY are supposed to be two different modes. All that you are doing is making them the same mode.

No, not a "workaround". The 168P does support extended standby. If allowed to be properly compiled. Which prior to my fix was not the case.

brice3010:
I found some more info: Arduino AtMega328p low power consumption - disk91.com - the IoT blogdisk91.com – the IoT blog

But where does it say extended standby is not supported by the 168P?

Nowhere.