Huge number of error messages for trying to compile SMTP Server on Generic ESP8266

/*
  Rui Santos
  Complete project details at:
   - ESP32: https://RandomNerdTutorials.com/esp32-send-email-smtp-server-arduino-ide/
   - ESP8266: https://RandomNerdTutorials.com/esp8266-nodemcu-send-email-smtp-server-arduino/
  
  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files.
  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
  Example adapted from: https://github.com/mobizt/ESP-Mail-Client
*/

#include <Arduino.h>
#if defined(ESP32)
  #include <WiFi.h>
#elif defined(ESP8266)
  #include <ESP8266WiFi.h>
#endif
#include <ESP_Mail_Client.h>

#define WIFI_SSID "Wiki:EffectiveAltruism"
#define WIFI_PASSWORD "mypassword"

/** The smtp host name e.g. smtp.gmail.com for GMail or smtp.office365.com for Outlook or smtp.mail.yahoo.com */
#define SMTP_HOST "smtp.gmail.com"
#define SMTP_PORT 465

/* The sign in credentials */
#define AUTHOR_EMAIL "mygmail@gmail.com"
#define AUTHOR_PASSWORD "codeThing"

/* Recipient's email*/
#define RECIPIENT_EMAIL "myOtherEmail@gmail.com"

/* Declare the global used SMTPSession object for SMTP transport */
SMTPSession smtp;

/* Callback function to get the Email sending status */
void smtpCallback(SMTP_Status status);

void setup(){
  Serial.begin(115200);
  Serial.println();
  WiFi.begin(WIFI_SSID, WIFI_PASSWORD);
  Serial.print("Connecting to Wi-Fi");
  while (WiFi.status() != WL_CONNECTED){
    Serial.print(".");
    delay(300);
  }
  Serial.println();
  Serial.print("Connected with IP: ");
  Serial.println(WiFi.localIP());
  Serial.println();

  /*  Set the network reconnection option */
  MailClient.networkReconnect(true);

  /** Enable the debug via Serial port
   * 0 for no debugging
   * 1 for basic level debugging
   *
   * Debug port can be changed via ESP_MAIL_DEFAULT_DEBUG_PORT in ESP_Mail_FS.h
   */
  smtp.debug(1);

  /* Set the callback function to get the sending results */
  smtp.callback(smtpCallback);

  /* Declare the Session_Config for user defined session credentials */
  Session_Config config;

  /* Set the session config */
  config.server.host_name = SMTP_HOST;
  config.server.port = SMTP_PORT;
  config.login.email = AUTHOR_EMAIL;
  config.login.password = AUTHOR_PASSWORD;
  config.login.user_domain = "";

  /*
  Set the NTP config time
  For times east of the Prime Meridian use 0-12
  For times west of the Prime Meridian add 12 to the offset.
  Ex. American/Denver GMT would be -6. 6 + 12 = 18
  See https://en.wikipedia.org/wiki/Time_zone for a list of the GMT/UTC timezone offsets
  */
  config.time.ntp_server = F("pool.ntp.org,time.nist.gov");
  config.time.gmt_offset = -5;    // was 3
  config.time.day_light_offset = 0;

  /* Declare the message class */
  SMTP_Message message;

  /* Set the message headers */
  message.sender.name = F("ESP");
  message.sender.email = AUTHOR_EMAIL;
  message.subject = F("ESP Test Email");
  message.addRecipient(F("Me"), RECIPIENT_EMAIL);
    
  /*Send HTML message*/
  /*String htmlMsg = "<div style=\"color:#2f4468;\"><h1>Hello World!</h1><p>- Sent from ESP board</p></div>";
  message.html.content = htmlMsg.c_str();
  message.html.content = htmlMsg.c_str();
  message.text.charSet = "us-ascii";
  message.html.transfer_encoding = Content_Transfer_Encoding::enc_7bit;*/

   
  //Send raw text message
  String textMsg = "Hello World! - Sent from ESP board";
  message.text.content = textMsg.c_str();
  message.text.charSet = "us-ascii";
  message.text.transfer_encoding = Content_Transfer_Encoding::enc_7bit;
  
  message.priority = esp_mail_smtp_priority::esp_mail_smtp_priority_low;
  message.response.notify = esp_mail_smtp_notify_success | esp_mail_smtp_notify_failure | esp_mail_smtp_notify_delay;


  /* Connect to the server */
  if (!smtp.connect(&config)){
    ESP_MAIL_PRINTF("Connection error, Status Code: %d, Error Code: %d, Reason: %s", smtp.statusCode(), smtp.errorCode(), smtp.errorReason().c_str());
    return;
  }

  if (!smtp.isLoggedIn()){
    Serial.println("\nNot yet logged in.");
  }
  else{
    if (smtp.isAuthenticated())
      Serial.println("\nSuccessfully logged in.");
    else
      Serial.println("\nConnected with no Auth.");
  }

  /* Start sending Email and close the session */
  if (!MailClient.sendMail(&smtp, &message))
    ESP_MAIL_PRINTF("Error, Status Code: %d, Error Code: %d, Reason: %s", smtp.statusCode(), smtp.errorCode(), smtp.errorReason().c_str());

}

void loop(){
}

/* Callback function to get the Email sending status */
void smtpCallback(SMTP_Status status){
  /* Print the current status */
  Serial.println(status.info());

  /* Print the sending result */
  if (status.success()){
    // ESP_MAIL_PRINTF used in the examples is for format printing via debug Serial port
    // that works for all supported Arduino platform SDKs e.g. AVR, SAMD, ESP32 and ESP8266.
    // In ESP8266 and ESP32, you can use Serial.printf directly.

    Serial.println("----------------");
    ESP_MAIL_PRINTF("Message sent success: %d\n", status.completedCount());
    ESP_MAIL_PRINTF("Message sent failed: %d\n", status.failedCount());
    Serial.println("----------------\n");

    for (size_t i = 0; i < smtp.sendingResult.size(); i++)
    {
      /* Get the result item */
      SMTP_Result result = smtp.sendingResult.getItem(i);

      // In case, ESP32, ESP8266 and SAMD device, the timestamp get from result.timestamp should be valid if
      // your device time was synched with NTP server.
      // Other devices may show invalid timestamp as the device time was not set i.e. it will show Jan 1, 1970.
      // You can call smtp.setSystemTime(xxx) to set device time manually. Where xxx is timestamp (seconds since Jan 1, 1970)
      
      ESP_MAIL_PRINTF("Message No: %d\n", i + 1);
      ESP_MAIL_PRINTF("Status: %s\n", result.completed ? "success" : "failed");
      ESP_MAIL_PRINTF("Date/Time: %s\n", MailClient.Time.getDateTimeString(result.timestamp, "%B %d, %Y %H:%M:%S").c_str());
      ESP_MAIL_PRINTF("Recipient: %s\n", result.recipients.c_str());
      ESP_MAIL_PRINTF("Subject: %s\n", result.subject.c_str());
    }
    Serial.println("----------------\n");

    // You need to clear sending result as the memory usage will grow up.
    smtp.sendingResult.clear();
  }
}

Arduino: 1.8.13 (Windows 7), Board: "Generic ESP8266 Module, 80 MHz, Flash, Disabled (new aborts on oom), Disabled, All SSL ciphers (most compatible), 32KB cache + 32KB IRAM (balanced), Use pgm_read macros for IRAM/PROGMEM, dtr (aka nodemcu), 26 MHz, 40MHz, DOUT (compatible), 1MB (FS:64KB OTA:~470KB), 2, nonos-sdk 2.2.1+100 (190703), v2 Lower Memory, Disabled, None, Only Sketch, 115200"

In file included from C:\Users\Adam\Documents\Arduino\libraries\SdFat\src/FatLib/FatLib.h:27,

             from C:\Users\Adam\Documents\Arduino\libraries\SdFat\src/SdFat.h:33,

             from C:\Users\Adam\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.1\libraries\SDFS\src/SDFS.h:35,

             from C:\Users\Adam\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.1\libraries\SD\src/SD.h:25,

             from C:\Users\Adam\Documents\Arduino\libraries\ESP_Mail_Client\src/ESP_Mail_FS.h:116,

             from C:\Users\Adam\Documents\Arduino\libraries\ESP_Mail_Client\src/extras/RFC2047.h:12,

             from C:\Users\Adam\Documents\Arduino\libraries\ESP_Mail_Client\src/ESP_Mail_Client.h:39,

             from C:\Users\Adam\Documents\Arduino\23-8-9_leakdetectorWiFiEmail\23-8-9_leakdetectorWiFiEmail.ino:18:

C:\Users\Adam\Documents\Arduino\libraries\SdFat\src/FatLib/ArduinoFiles.h:122:7: error: redefinition of 'class fs::File'

122 | class File : public FatFile, public Stream {

  |       ^~~~

In file included from C:\Users\Adam\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.1\libraries\ESP8266WiFi\src/CertStoreBearSSL.h:26,

             from C:\Users\Adam\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.1\libraries\ESP8266WiFi\src/WiFiClientSecureBearSSL.h:30,

             from C:\Users\Adam\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.1\libraries\ESP8266WiFi\src/WiFiClientSecure.h:23,

             from C:\Users\Adam\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.1\libraries\ESP8266WiFi\src/WiFiServerSecure.h:20,

             from C:\Users\Adam\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.1\libraries\ESP8266WiFi\src/ESP8266WiFi.h:41,

             from C:\Users\Adam\Documents\Arduino\23-8-9_leakdetectorWiFiEmail\23-8-9_leakdetectorWiFiEmail.ino:16:

C:\Users\Adam\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.1\cores\esp8266/FS.h:52:7: note: previous definition of 'class fs::File'

52 | class File : public Stream

  |       ^~~~

In file included from C:\Users\Adam\Documents\Arduino\libraries\SdFat\src/FatLib/FatLib.h:28,

             from C:\Users\Adam\Documents\Arduino\libraries\SdFat\src/SdFat.h:33,

             from C:\Users\Adam\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.1\libraries\SDFS\src/SDFS.h:35,

             from C:\Users\Adam\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.1\libraries\SD\src/SD.h:25,

             from C:\Users\Adam\Documents\Arduino\libraries\ESP_Mail_Client\src/ESP_Mail_FS.h:116,

             from C:\Users\Adam\Documents\Arduino\libraries\ESP_Mail_Client\src/extras/RFC2047.h:12,

             from C:\Users\Adam\Documents\Arduino\libraries\ESP_Mail_Client\src/ESP_Mail_Client.h:39,

             from C:\Users\Adam\Documents\Arduino\23-8-9_leakdetectorWiFiEmail\23-8-9_leakdetectorWiFiEmail.ino:18:

C:\Users\Adam\Documents\Arduino\libraries\SdFat\src/FatLib/FatFileSystem.h: In member function 'fs::File FatFileSystem::open(const char*, oflag_t)':

C:\Users\Adam\Documents\Arduino\libraries\SdFat\src/FatLib/FatFileSystem.h:95:13: error: 'class fs::File' has no member named 'open'

95 | tmpFile.open(vwd(), path, oflag);

  |             ^~~~

In file included from C:\Users\Adam\Documents\Arduino\libraries\SdFat\src/SdCard/SdSpiCard.h:33,

             from C:\Users\Adam\Documents\Arduino\libraries\SdFat\src/BlockDriver.h:32,

             from C:\Users\Adam\Documents\Arduino\libraries\SdFat\src/SdFat.h:32,

             from C:\Users\Adam\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.1\libraries\SDFS\src/SDFS.h:35,

             from C:\Users\Adam\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.1\libraries\SD\src/SD.h:25,

             from C:\Users\Adam\Documents\Arduino\libraries\ESP_Mail_Client\src/ESP_Mail_FS.h:116,

             from C:\Users\Adam\Documents\Arduino\libraries\ESP_Mail_Client\src/extras/RFC2047.h:12,

             from C:\Users\Adam\Documents\Arduino\libraries\ESP_Mail_Client\src/ESP_Mail_Client.h:39,

             from C:\Users\Adam\Documents\Arduino\23-8-9_leakdetectorWiFiEmail\23-8-9_leakdetectorWiFiEmail.ino:18:

C:\Users\Adam\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.1\libraries\SDFS\src/SDFS.h: At global scope:

C:\Users\Adam\Documents\Arduino\libraries\SdFat\src/SdCard/SdInfo.h:105:28: error: could not convert 'SPISettings(((uint32_t)(1000000 * 10)), 1, ((int)((uint8_t)SPI_MODE0)))' from 'SPISettings' to 'uint32_t' {aka 'unsigned int'}

105 | #define SD_SCK_MHZ(maxMhz) SPISettings(1000000UL*maxMhz, MSBFIRST, SPI_MODE0)

  |                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

  |                            |

  |                            SPISettings

C:\Users\Adam\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.1\libraries\SDFS\src/SDFS.h:47:50: note: in expansion of macro 'SD_SCK_MHZ'

47 | SDFSConfig(uint8_t csPin = 4, uint32_t spi = SD_SCK_MHZ(10)) : FSConfig(FSId, false), _csPin(csPin), _part(0), _spiSettings(spi) { }

  |                                                  ^~~~~~~~~~

In file included from C:\Users\Adam\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.1\libraries\SD\src/SD.h:25,

             from C:\Users\Adam\Documents\Arduino\libraries\ESP_Mail_Client\src/ESP_Mail_FS.h:116,

             from C:\Users\Adam\Documents\Arduino\libraries\ESP_Mail_Client\src/extras/RFC2047.h:12,

             from C:\Users\Adam\Documents\Arduino\libraries\ESP_Mail_Client\src/ESP_Mail_Client.h:39,

             from C:\Users\Adam\Documents\Arduino\23-8-9_leakdetectorWiFiEmail\23-8-9_leakdetectorWiFiEmail.ino:18:

C:\Users\Adam\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.1\libraries\SDFS\src/SDFS.h: In constructor 'sdfs::SDFSImpl::SDFSImpl()':

C:\Users\Adam\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.1\libraries\SDFS\src/SDFS.h:75:32: error: cannot convert 'SPISettings' to 'uint32_t' {aka 'unsigned int'}

75 | SDFSImpl() : _mounted(false)

  |                                ^

  |                                |

  |                                SPISettings

In file included from C:\Users\Adam\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.1\libraries\SD\src/SD.h:25,

             from C:\Users\Adam\Documents\Arduino\libraries\ESP_Mail_Client\src/ESP_Mail_FS.h:116,

             from C:\Users\Adam\Documents\Arduino\libraries\ESP_Mail_Client\src/extras/RFC2047.h:12,

             from C:\Users\Adam\Documents\Arduino\libraries\ESP_Mail_Client\src/ESP_Mail_Client.h:39,

             from C:\Users\Adam\Documents\Arduino\23-8-9_leakdetectorWiFiEmail\23-8-9_leakdetectorWiFiEmail.ino:18:

C:\Users\Adam\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.1\libraries\SDFS\src/SDFS.h:47:44: note: initializing argument 2 of 'sdfs::SDFSConfig::SDFSConfig(uint8_t, uint32_t)'

47 | SDFSConfig(uint8_t csPin = 4, uint32_t spi = SD_SCK_MHZ(10)) : FSConfig(FSId, false), _csPin(csPin), _part(0), _spiSettings(spi) { }

In file included from C:\Users\Adam\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.1\libraries\SD\src/SD.h:25,

             from C:\Users\Adam\Documents\Arduino\libraries\ESP_Mail_Client\src/ESP_Mail_FS.h:116,

             from C:\Users\Adam\Documents\Arduino\libraries\ESP_Mail_Client\src/extras/RFC2047.h:12,

             from C:\Users\Adam\Documents\Arduino\libraries\ESP_Mail_Client\src/ESP_Mail_Client.h:39,

             from C:\Users\Adam\Documents\Arduino\23-8-9_leakdetectorWiFiEmail\23-8-9_leakdetectorWiFiEmail.ino:18:

C:\Users\Adam\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.1\libraries\SDFS\src/SDFS.h: In member function 'virtual bool sdfs::SDFSImpl::info64(fs::FSInfo64&)':

C:\Users\Adam\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.1\libraries\SDFS\src/SDFS.h:97:37: error: 'class FatVolume' has no member named 'bytesPerCluster'; did you mean 'blocksPerCluster'?

97 | info.blockSize = _fs.vol()->bytesPerCluster();

  |                                     ^~~~~~~~~~~~~~~

  |                                     blocksPerCluster

C:\Users\Adam\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.1\libraries\SDFS\src/SDFS.h: In member function 'virtual bool sdfs::SDFSImpl::begin()':

C:\Users\Adam\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.1\libraries\SDFS\src/SDFS.h:151:48: error: cannot convert 'uint32_t' {aka 'unsigned int'} to 'SPISettings'

151 | _mounted = _fs.begin(_cfg._csPin, _cfg._spiSettings);

  |                                           ~~~~~^~~~~~~~~~~~

  |                                                |

  |                                                uint32_t {aka unsigned int}

In file included from C:\Users\Adam\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.1\libraries\SDFS\src/SDFS.h:35,

             from C:\Users\Adam\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.1\libraries\SD\src/SD.h:25,

             from C:\Users\Adam\Documents\Arduino\libraries\ESP_Mail_Client\src/ESP_Mail_FS.h:116,

             from C:\Users\Adam\Documents\Arduino\libraries\ESP_Mail_Client\src/extras/RFC2047.h:12,

             from C:\Users\Adam\Documents\Arduino\libraries\ESP_Mail_Client\src/ESP_Mail_Client.h:39,

             from C:\Users\Adam\Documents\Arduino\23-8-9_leakdetectorWiFiEmail\23-8-9_leakdetectorWiFiEmail.ino:18:

C:\Users\Adam\Documents\Arduino\libraries\SdFat\src/SdFat.h:329:46: note: initializing argument 2 of 'bool SdFat::begin(uint8_t, SPISettings)'

329 | bool begin(uint8_t csPin = SS, SPISettings spiSettings = SPI_FULL_SPEED) {

In file included from C:\Users\Adam\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.1\libraries\SD\src/SD.h:25,

             from C:\Users\Adam\Documents\Arduino\libraries\ESP_Mail_Client\src/ESP_Mail_FS.h:116,

             from C:\Users\Adam\Documents\Arduino\libraries\ESP_Mail_Client\src/extras/RFC2047.h:12,

             from C:\Users\Adam\Documents\Arduino\libraries\ESP_Mail_Client\src/ESP_Mail_Client.h:39,

             from C:\Users\Adam\Documents\Arduino\23-8-9_leakdetectorWiFiEmail\23-8-9_leakdetectorWiFiEmail.ino:18:

C:\Users\Adam\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.1\libraries\SDFS\src/SDFS.h:154:52: error: cannot convert 'uint32_t' {aka 'unsigned int'} to 'SPISettings'

154 | _mounted = _fs.begin(_cfg._csPin, _cfg._spiSettings);

  |                                               ~~~~~^~~~~~~~~~~~

  |                                                    |

  |                                                    uint32_t {aka unsigned int}

In file included from C:\Users\Adam\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.1\libraries\SDFS\src/SDFS.h:35,

             from C:\Users\Adam\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.1\libraries\SD\src/SD.h:25,

             from C:\Users\Adam\Documents\Arduino\libraries\ESP_Mail_Client\src/ESP_Mail_FS.h:116,

             from C:\Users\Adam\Documents\Arduino\libraries\ESP_Mail_Client\src/extras/RFC2047.h:12,

             from C:\Users\Adam\Documents\Arduino\libraries\ESP_Mail_Client\src/ESP_Mail_Client.h:39,

             from C:\Users\Adam\Documents\Arduino\23-8-9_leakdetectorWiFiEmail\23-8-9_leakdetectorWiFiEmail.ino:18:

C:\Users\Adam\Documents\Arduino\libraries\SdFat\src/SdFat.h:329:46: note: initializing argument 2 of 'bool SdFat::begin(uint8_t, SPISettings)'

329 | bool begin(uint8_t csPin = SS, SPISettings spiSettings = SPI_FULL_SPEED) {

In file included from C:\Users\Adam\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.1\libraries\SD\src/SD.h:25,

             from C:\Users\Adam\Documents\Arduino\libraries\ESP_Mail_Client\src/ESP_Mail_FS.h:116,

             from C:\Users\Adam\Documents\Arduino\libraries\ESP_Mail_Client\src/extras/RFC2047.h:12,

             from C:\Users\Adam\Documents\Arduino\libraries\ESP_Mail_Client\src/ESP_Mail_Client.h:39,

             from C:\Users\Adam\Documents\Arduino\23-8-9_leakdetectorWiFiEmail\23-8-9_leakdetectorWiFiEmail.ino:18:

C:\Users\Adam\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.1\libraries\SDFS\src/SDFS.h:156:2: error: 'FsDateTime' has not been declared

156 | FsDateTime::setCallback(dateTimeCB);

  |  ^~~~~~~~~~

C:\Users\Adam\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.1\libraries\SDFS\src/SDFS.h: In member function 'size_t sdfs::SDFSImpl::clusterSize()':

C:\Users\Adam\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.1\libraries\SDFS\src/SDFS.h:185:27: error: 'class FatVolume' has no member named 'bytesPerCluster'; did you mean 'blocksPerCluster'?

185 | return _fs.vol()->bytesPerCluster();

  |                           ^~~~~~~~~~~~~~~

  |                           blocksPerCluster

C:\Users\Adam\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.1\libraries\SDFS\src/SDFS.h: At global scope:

C:\Users\Adam\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.1\libraries\SDFS\src/SDFS.h:264:48: error: 'File32' was not declared in this scope

264 | SDFSFileImpl(SDFSImpl *fs, std::shared_ptr fd, const char *name)

  |                                                ^~~~~~

C:\Users\Adam\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.1\libraries\SDFS\src/SDFS.h:264:54: error: template argument 1 is invalid

264 | SDFSFileImpl(SDFSImpl *fs, std::shared_ptr fd, const char *name)

  |                                                      ^

C:\Users\Adam\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.1\libraries\SDFS\src/SDFS.h:401:21: error: 'File32' was not declared in this scope

401 | std::shared_ptr _fd;

  |                     ^~~~~~

C:\Users\Adam\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.1\libraries\SDFS\src/SDFS.h:401:27: error: template argument 1 is invalid

401 | std::shared_ptr _fd;

  |                           ^

C:\Users\Adam\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.1\libraries\SDFS\src/SDFS.h: In member function 'virtual int sdfs::SDFSFileImpl::availableForWrite()':

C:\Users\Adam\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.1\libraries\SDFS\src/SDFS.h:279:29: error: base operand of '->' is not a pointer

279 | return _opened ? _fd->availableSpaceForWrite() : 0;

  |                             ^~

C:\Users\Adam\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.1\libraries\SDFS\src/SDFS.h: In member function 'virtual size_t sdfs::SDFSFileImpl::write(const uint8_t*, size_t)':

C:\Users\Adam\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.1\libraries\SDFS\src/SDFS.h:284:29: error: base operand of '->' is not a pointer

284 | return _opened ? _fd->write(buf, size) : -1;

  |                             ^~

C:\Users\Adam\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.1\libraries\SDFS\src/SDFS.h: In member function 'virtual int sdfs::SDFSFileImpl::read(uint8_t*, size_t)':

C:\Users\Adam\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.1\libraries\SDFS\src/SDFS.h:289:29: error: base operand of '->' is not a pointer

289 | return _opened ? _fd->read(buf, size) : -1;

  |                             ^~

C:\Users\Adam\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.1\libraries\SDFS\src/SDFS.h: In member function 'virtual void sdfs::SDFSFileImpl::flush()':

C:\Users\Adam\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.1\libraries\SDFS\src/SDFS.h:295:16: error: base operand of '->' is not a pointer

295 | _fd->sync();

  |                ^~

C:\Users\Adam\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.1\libraries\SDFS\src/SDFS.h: In member function 'virtual bool sdfs::SDFSFileImpl::seek(uint32_t, fs::SeekMode)':

C:\Users\Adam\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.1\libraries\SDFS\src/SDFS.h:306:27: error: base operand of '->' is not a pointer

306 | return _fd->seekSet(pos);

  |                           ^~

C:\Users\Adam\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.1\libraries\SDFS\src/SDFS.h:308:27: error: base operand of '->' is not a pointer

308 | return _fd->seekEnd(-pos); // TODO again, odd from POSIX

  |                           ^~

C:\Users\Adam\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.1\libraries\SDFS\src/SDFS.h:310:27: error: base operand of '->' is not a pointer

310 | return _fd->seekCur(pos);

  |                           ^~

C:\Users\Adam\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.1\libraries\SDFS\src/SDFS.h: In member function 'virtual size_t sdfs::SDFSFileImpl::position() const':

C:\Users\Adam\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.1\libraries\SDFS\src/SDFS.h:321:29: error: base operand of '->' is not a pointer

321 | return _opened ? _fd->curPosition() : 0;

  |                             ^~

C:\Users\Adam\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.1\libraries\SDFS\src/SDFS.h: In member function 'virtual size_t sdfs::SDFSFileImpl::size() const':

C:\Users\Adam\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.1\libraries\SDFS\src/SDFS.h:326:29: error: base operand of '->' is not a pointer

326 | return _opened ? _fd->fileSize() : 0;

  |                             ^~

C:\Users\Adam\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.1\libraries\SDFS\src/SDFS.h: In member function 'virtual bool sdfs::SDFSFileImpl::truncate(uint32_t)':

C:\Users\Adam\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.1\libraries\SDFS\src/SDFS.h:335:19: error: base operand of '->' is not a pointer

335 | return _fd->truncate(size);

  |                   ^~

C:\Users\Adam\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.1\libraries\SDFS\src/SDFS.h: In member function 'virtual void sdfs::SDFSFileImpl::close()':

C:\Users\Adam\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.1\libraries\SDFS\src/SDFS.h:341:16: error: base operand of '->' is not a pointer

341 | _fd->close();

  |                ^~

C:\Users\Adam\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.1\libraries\SDFS\src/SDFS.h: In member function 'virtual bool sdfs::SDFSFileImpl::isFile() const':

C:\Users\Adam\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.1\libraries\SDFS\src/SDFS.h:369:29: error: base operand of '->' is not a pointer

369 | return _opened ? _fd->isFile() : false;;

  |                             ^~

C:\Users\Adam\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.1\libraries\SDFS\src/SDFS.h: In member function 'virtual bool sdfs::SDFSFileImpl::isDirectory() const':

C:\Users\Adam\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.1\libraries\SDFS\src/SDFS.h:374:29: error: base operand of '->' is not a pointer

374 | return _opened ? _fd->isDir() : false;

  |                             ^~

C:\Users\Adam\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.1\libraries\SDFS\src/SDFS.h: In member function 'virtual time_t sdfs::SDFSFileImpl::getLastWrite()':

C:\Users\Adam\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.1\libraries\SDFS\src/SDFS.h:380:13: error: 'DirFat_t' was not declared in this scope

380 | DirFat_t tmp;

  |             ^~~~~~~~

C:\Users\Adam\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.1\libraries\SDFS\src/SDFS.h:381:21: error: request for member 'get' in '((sdfs::SDFSFileImpl*)this)->sdfs::SDFSFileImpl::_fd', which is of non-class type 'int'

381 | if (_fd.get()->dirEntry(&tmp)) {

  |                     ^~~

C:\Users\Adam\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.1\libraries\SDFS\src/SDFS.h:381:38: error: 'tmp' was not declared in this scope; did you mean 'tm'?

381 | if (_fd.get()->dirEntry(&tmp)) {

  |                                      ^~~

  |                                      tm

C:\Users\Adam\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.1\libraries\SDFS\src/SDFS.h: In member function 'virtual time_t sdfs::SDFSFileImpl::getCreationTime()':

C:\Users\Adam\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.1\libraries\SDFS\src/SDFS.h:391:13: error: 'DirFat_t' was not declared in this scope

391 | DirFat_t tmp;

  |             ^~~~~~~~

C:\Users\Adam\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.1\libraries\SDFS\src/SDFS.h:392:21: error: request for member 'get' in '((sdfs::SDFSFileImpl*)this)->sdfs::SDFSFileImpl::_fd', which is of non-class type 'int'

392 | if (_fd.get()->dirEntry(&tmp)) {

  |                     ^~~

C:\Users\Adam\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.1\libraries\SDFS\src/SDFS.h:392:38: error: 'tmp' was not declared in this scope; did you mean 'tm'?

392 | if (_fd.get()->dirEntry(&tmp)) {

  |                                      ^~~

  |                                      tm

C:\Users\Adam\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.1\libraries\SDFS\src/SDFS.h: At global scope:

C:\Users\Adam\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.1\libraries\SDFS\src/SDFS.h:409:70: error: 'File32' was not declared in this scope

409 | SDFSDirImpl(const String& pattern, SDFSImpl* fs, std::shared_ptr dir, const char *dirPath = nullptr)

  |                                                                      ^~~~~~

C:\Users\Adam\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.1\libraries\SDFS\src/SDFS.h:409:76: error: template argument 1 is invalid

409 | SDFSDirImpl(const String& pattern, SDFSImpl* fs, std::shared_ptr dir, const char *dirPath = nullptr)

  |                                                                            ^

C:\Users\Adam\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.1\libraries\SDFS\src/SDFS.h:518:21: error: 'File32' was not declared in this scope

518 | std::shared_ptr _dir;

  |                     ^~~~~~

C:\Users\Adam\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.1\libraries\SDFS\src/SDFS.h:518:27: error: template argument 1 is invalid

518 | std::shared_ptr _dir;

  |                           ^

C:\Users\Adam\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.1\libraries\SDFS\src/SDFS.h: In destructor 'virtual sdfs::SDFSDirImpl::~SDFSDirImpl()':

C:\Users\Adam\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.1\libraries\SDFS\src/SDFS.h:420:13: error: base operand of '->' is not a pointer

420 | _dir->close();

  |             ^~

C:\Users\Adam\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.1\libraries\SDFS\src/SDFS.h: In member function 'virtual bool sdfs::SDFSDirImpl::next()':

C:\Users\Adam\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.1\libraries\SDFS\src/SDFS.h:484:13: error: 'File32' was not declared in this scope

484 | File32 file;

  |             ^~~~~~

C:\Users\Adam\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.1\libraries\SDFS\src/SDFS.h:485:13: error: 'file' was not declared in this scope

485 | file.openNext(_dir.get(), O_READ);

  |             ^~~~

C:\Users\Adam\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.1\libraries\SDFS\src/SDFS.h:485:32: error: request for member 'get' in '((sdfs::SDFSDirImpl*)this)->sdfs::SDFSDirImpl::_dir', which is of non-class type 'int'

485 | file.openNext(_dir.get(), O_READ);

  |                                ^~~

C:\Users\Adam\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.1\libraries\SDFS\src/SDFS.h:491:17: error: 'DirFat_t' was not declared in this scope

491 | DirFat_t tmp;

  |                 ^~~~~~~~

C:\Users\Adam\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.1\libraries\SDFS\src/SDFS.h:492:36: error: 'tmp' was not declared in this scope; did you mean 'tm'?

492 | if (file.dirEntry(&tmp)) {

  |                                    ^~~

  |                                    tm

C:\Users\Adam\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.1\libraries\SDFS\src/SDFS.h: In member function 'virtual bool sdfs::SDFSDirImpl::rewind()':

C:\Users\Adam\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.1\libraries\SDFS\src/SDFS.h:511:13: error: base operand of '->' is not a pointer

511 | _dir->rewind();

  |             ^~

In file included from C:\Users\Adam\Documents\Arduino\libraries\SdFat\src/SdCard/SdSpiCard.h:33,

             from C:\Users\Adam\Documents\Arduino\libraries\SdFat\src/BlockDriver.h:32,

             from C:\Users\Adam\Documents\Arduino\libraries\SdFat\src/SdFat.h:32,

             from C:\Users\Adam\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.1\libraries\SDFS\src/SDFS.h:35,

             from C:\Users\Adam\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.1\libraries\SD\src/SD.h:25,

             from C:\Users\Adam\Documents\Arduino\libraries\ESP_Mail_Client\src/ESP_Mail_FS.h:116,

             from C:\Users\Adam\Documents\Arduino\libraries\ESP_Mail_Client\src/extras/RFC2047.h:12,

             from C:\Users\Adam\Documents\Arduino\libraries\ESP_Mail_Client\src/ESP_Mail_Client.h:39,

             from C:\Users\Adam\Documents\Arduino\23-8-9_leakdetectorWiFiEmail\23-8-9_leakdetectorWiFiEmail.ino:18:

C:\Users\Adam\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.1\libraries\SD\src/SD.h: At global scope:

C:\Users\Adam\Documents\Arduino\libraries\SdFat\src/SdCard/SdInfo.h:104:29: error: could not convert 'SPISettings(((uint32_t)(80000000 / 4)), 1, ((int)((uint8_t)SPI_MODE0)))' from 'SPISettings' to 'uint32_t' {aka 'unsigned int'}

104 | #define SD_SCK_HZ(maxSpeed) SPISettings(maxSpeed, MSBFIRST, SPI_MODE0)

  |                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

  |                             |

  |                             SPISettings

C:\Users\Adam\Documents\Arduino\libraries\SdFat\src/SdCard/SdInfo.h:112:24: note: in expansion of macro 'SD_SCK_HZ'

112 | #define SPI_HALF_SPEED SD_SCK_HZ(F_CPU/4)

  |                        ^~~~~~~~~

C:\Users\Adam\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.1\libraries\SD\src/SD.h:35:46: note: in expansion of macro 'SPI_HALF_SPEED'

35 | bool begin(uint8_t csPin, uint32_t cfg = SPI_HALF_SPEED) {

  |                                              ^~~~~~~~~~~~~~

In file included from C:\Users\Adam\Documents\Arduino\libraries\ESP_Mail_Client\src/ESP_Mail_FS.h:116,

             from C:\Users\Adam\Documents\Arduino\libraries\ESP_Mail_Client\src/extras/RFC2047.h:12,

             from C:\Users\Adam\Documents\Arduino\libraries\ESP_Mail_Client\src/ESP_Mail_Client.h:39,

             from C:\Users\Adam\Documents\Arduino\23-8-9_leakdetectorWiFiEmail\23-8-9_leakdetectorWiFiEmail.ino:18:

C:\Users\Adam\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.1\libraries\SD\src/SD.h:186:24: error: redefinition of 'uint16_t FAT_YEAR(uint16_t)'

186 | static inline uint16_t FAT_YEAR(uint16_t fatDate) {

  |                        ^~~~~~~~

In file included from C:\Users\Adam\Documents\Arduino\libraries\SdFat\src/FatLib/FatFile.h:37,

             from C:\Users\Adam\Documents\Arduino\libraries\SdFat\src/FatLib/ArduinoFiles.h:33,

             from C:\Users\Adam\Documents\Arduino\libraries\SdFat\src/FatLib/FatLib.h:27,

             from C:\Users\Adam\Documents\Arduino\libraries\SdFat\src/SdFat.h:33,

             from C:\Users\Adam\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.1\libraries\SDFS\src/SDFS.h:35,

             from C:\Users\Adam\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.1\libraries\SD\src/SD.h:25,

             from C:\Users\Adam\Documents\Arduino\libraries\ESP_Mail_Client\src/ESP_Mail_FS.h:116,

             from C:\Users\Adam\Documents\Arduino\libraries\ESP_Mail_Client\src/extras/RFC2047.h:12,

             from C:\Users\Adam\Documents\Arduino\libraries\ESP_Mail_Client\src/ESP_Mail_Client.h:39,

             from C:\Users\Adam\Documents\Arduino\23-8-9_leakdetectorWiFiEmail\23-8-9_leakdetectorWiFiEmail.ino:18:

C:\Users\Adam\Documents\Arduino\libraries\SdFat\src/FatLib/FatStructs.h:770:24: note: 'uint16_t FAT_YEAR(uint16_t)' previously defined here

770 | static inline uint16_t FAT_YEAR(uint16_t fatDate) {

  |                        ^~~~~~~~

In file included from C:\Users\Adam\Documents\Arduino\libraries\ESP_Mail_Client\src/ESP_Mail_FS.h:116,

             from C:\Users\Adam\Documents\Arduino\libraries\ESP_Mail_Client\src/extras/RFC2047.h:12,

             from C:\Users\Adam\Documents\Arduino\libraries\ESP_Mail_Client\src/ESP_Mail_Client.h:39,

             from C:\Users\Adam\Documents\Arduino\23-8-9_leakdetectorWiFiEmail\23-8-9_leakdetectorWiFiEmail.ino:18:

C:\Users\Adam\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.1\libraries\SD\src/SD.h:189:23: error: redefinition of 'uint8_t FAT_MONTH(uint16_t)'

189 | static inline uint8_t FAT_MONTH(uint16_t fatDate) {

  |                       ^~~~~~~~~

In file included from C:\Users\Adam\Documents\Arduino\libraries\SdFat\src/FatLib/FatFile.h:37,

             from C:\Users\Adam\Documents\Arduino\libraries\SdFat\src/FatLib/ArduinoFiles.h:33,

             from C:\Users\Adam\Documents\Arduino\libraries\SdFat\src/FatLib/FatLib.h:27,

             from C:\Users\Adam\Documents\Arduino\libraries\SdFat\src/SdFat.h:33,

             from C:\Users\Adam\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.1\libraries\SDFS\src/SDFS.h:35,

             from C:\Users\Adam\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.1\libraries\SD\src/SD.h:25,

             from C:\Users\Adam\Documents\Arduino\libraries\ESP_Mail_Client\src/ESP_Mail_FS.h:116,

             from C:\Users\Adam\Documents\Arduino\libraries\ESP_Mail_Client\src/extras/RFC2047.h:12,

             from C:\Users\Adam\Documents\Arduino\libraries\ESP_Mail_Client\src/ESP_Mail_Client.h:39,

             from C:\Users\Adam\Documents\Arduino\23-8-9_leakdetectorWiFiEmail\23-8-9_leakdetectorWiFiEmail.ino:18:

C:\Users\Adam\Documents\Arduino\libraries\SdFat\src/FatLib/FatStructs.h:778:23: note: 'uint8_t FAT_MONTH(uint16_t)' previously defined here

778 | static inline uint8_t FAT_MONTH(uint16_t fatDate) {

  |                       ^~~~~~~~~

In file included from C:\Users\Adam\Documents\Arduino\libraries\ESP_Mail_Client\src/ESP_Mail_FS.h:116,

             from C:\Users\Adam\Documents\Arduino\libraries\ESP_Mail_Client\src/extras/RFC2047.h:12,

             from C:\Users\Adam\Documents\Arduino\libraries\ESP_Mail_Client\src/ESP_Mail_Client.h:39,

             from C:\Users\Adam\Documents\Arduino\23-8-9_leakdetectorWiFiEmail\23-8-9_leakdetectorWiFiEmail.ino:18:

C:\Users\Adam\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.1\libraries\SD\src/SD.h:192:23: error: redefinition of 'uint8_t FAT_DAY(uint16_t)'

192 | static inline uint8_t FAT_DAY(uint16_t fatDate) {

  |                       ^~~~~~~

In file included from C:\Users\Adam\Documents\Arduino\libraries\SdFat\src/FatLib/FatFile.h:37,

             from C:\Users\Adam\Documents\Arduino\libraries\SdFat\src/FatLib/ArduinoFiles.h:33,

             from C:\Users\Adam\Documents\Arduino\libraries\SdFat\src/FatLib/FatLib.h:27,

             from C:\Users\Adam\Documents\Arduino\libraries\SdFat\src/SdFat.h:33,

             from C:\Users\Adam\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.1\libraries\SDFS\src/SDFS.h:35,

             from C:\Users\Adam\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.1\libraries\SD\src/SD.h:25,

             from C:\Users\Adam\Documents\Arduino\libraries\ESP_Mail_Client\src/ESP_Mail_FS.h:116,

             from C:\Users\Adam\Documents\Arduino\libraries\ESP_Mail_Client\src/extras/RFC2047.h:12,

             from C:\Users\Adam\Documents\Arduino\libraries\ESP_Mail_Client\src/ESP_Mail_Client.h:39,

             from C:\Users\Adam\Documents\Arduino\23-8-9_leakdetectorWiFiEmail\23-8-9_leakdetectorWiFiEmail.ino:18:

C:\Users\Adam\Documents\Arduino\libraries\SdFat\src/FatLib/FatStructs.h:786:23: note: 'uint8_t FAT_DAY(uint16_t)' previously defined here

786 | static inline uint8_t FAT_DAY(uint16_t fatDate) {

  |                       ^~~~~~~

In file included from C:\Users\Adam\Documents\Arduino\libraries\ESP_Mail_Client\src/ESP_Mail_FS.h:116,

             from C:\Users\Adam\Documents\Arduino\libraries\ESP_Mail_Client\src/extras/RFC2047.h:12,

             from C:\Users\Adam\Documents\Arduino\libraries\ESP_Mail_Client\src/ESP_Mail_Client.h:39,

             from C:\Users\Adam\Documents\Arduino\23-8-9_leakdetectorWiFiEmail\23-8-9_leakdetectorWiFiEmail.ino:18:

C:\Users\Adam\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.1\libraries\SD\src/SD.h:195:23: error: redefinition of 'uint8_t FAT_HOUR(uint16_t)'

195 | static inline uint8_t FAT_HOUR(uint16_t fatTime) {

  |                       ^~~~~~~~

In file included from C:\Users\Adam\Documents\Arduino\libraries\SdFat\src/FatLib/FatFile.h:37,

             from C:\Users\Adam\Documents\Arduino\libraries\SdFat\src/FatLib/ArduinoFiles.h:33,

             from C:\Users\Adam\Documents\Arduino\libraries\SdFat\src/FatLib/FatLib.h:27,

             from C:\Users\Adam\Documents\Arduino\libraries\SdFat\src/SdFat.h:33,

             from C:\Users\Adam\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.1\libraries\SDFS\src/SDFS.h:35,

             from C:\Users\Adam\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.1\libraries\SD\src/SD.h:25,

             from C:\Users\Adam\Documents\Arduino\libraries\ESP_Mail_Client\src/ESP_Mail_FS.h:116,

             from C:\Users\Adam\Documents\Arduino\libraries\ESP_Mail_Client\src/extras/RFC2047.h:12,

             from C:\Users\Adam\Documents\Arduino\libraries\ESP_Mail_Client\src/ESP_Mail_Client.h:39,

             from C:\Users\Adam\Documents\Arduino\23-8-9_leakdetectorWiFiEmail\23-8-9_leakdetectorWiFiEmail.ino:18:

C:\Users\Adam\Documents\Arduino\libraries\SdFat\src/FatLib/FatStructs.h:804:23: note: 'uint8_t FAT_HOUR(uint16_t)' previously defined here

804 | static inline uint8_t FAT_HOUR(uint16_t fatTime) {

  |                       ^~~~~~~~

In file included from C:\Users\Adam\Documents\Arduino\libraries\ESP_Mail_Client\src/ESP_Mail_FS.h:116,

             from C:\Users\Adam\Documents\Arduino\libraries\ESP_Mail_Client\src/extras/RFC2047.h:12,

             from C:\Users\Adam\Documents\Arduino\libraries\ESP_Mail_Client\src/ESP_Mail_Client.h:39,

             from C:\Users\Adam\Documents\Arduino\23-8-9_leakdetectorWiFiEmail\23-8-9_leakdetectorWiFiEmail.ino:18:

C:\Users\Adam\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.1\libraries\SD\src/SD.h:198:23: error: redefinition of 'uint8_t FAT_MINUTE(uint16_t)'

198 | static inline uint8_t FAT_MINUTE(uint16_t fatTime) {

  |                       ^~~~~~~~~~

In file included from C:\Users\Adam\Documents\Arduino\libraries\SdFat\src/FatLib/FatFile.h:37,

             from C:\Users\Adam\Documents\Arduino\libraries\SdFat\src/FatLib/ArduinoFiles.h:33,

             from C:\Users\Adam\Documents\Arduino\libraries\SdFat\src/FatLib/FatLib.h:27,

             from C:\Users\Adam\Documents\Arduino\libraries\SdFat\src/SdFat.h:33,

             from C:\Users\Adam\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.1\libraries\SDFS\src/SDFS.h:35,

             from C:\Users\Adam\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.1\libraries\SD\src/SD.h:25,

             from C:\Users\Adam\Documents\Arduino\libraries\ESP_Mail_Client\src/ESP_Mail_FS.h:116,

             from C:\Users\Adam\Documents\Arduino\libraries\ESP_Mail_Client\src/extras/RFC2047.h:12,

             from C:\Users\Adam\Documents\Arduino\libraries\ESP_Mail_Client\src/ESP_Mail_Client.h:39,

             from C:\Users\Adam\Documents\Arduino\23-8-9_leakdetectorWiFiEmail\23-8-9_leakdetectorWiFiEmail.ino:18:

C:\Users\Adam\Documents\Arduino\libraries\SdFat\src/FatLib/FatStructs.h:812:23: note: 'uint8_t FAT_MINUTE(uint16_t)' previously defined here

812 | static inline uint8_t FAT_MINUTE(uint16_t fatTime) {

  |                       ^~~~~~~~~~

In file included from C:\Users\Adam\Documents\Arduino\libraries\ESP_Mail_Client\src/ESP_Mail_FS.h:116,

             from C:\Users\Adam\Documents\Arduino\libraries\ESP_Mail_Client\src/extras/RFC2047.h:12,

             from C:\Users\Adam\Documents\Arduino\libraries\ESP_Mail_Client\src/ESP_Mail_Client.h:39,

             from C:\Users\Adam\Documents\Arduino\23-8-9_leakdetectorWiFiEmail\23-8-9_leakdetectorWiFiEmail.ino:18:

C:\Users\Adam\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.1\libraries\SD\src/SD.h:201:23: error: redefinition of 'uint8_t FAT_SECOND(uint16_t)'

201 | static inline uint8_t FAT_SECOND(uint16_t fatTime) {

  |                       ^~~~~~~~~~

In file included from C:\Users\Adam\Documents\Arduino\libraries\SdFat\src/FatLib/FatFile.h:37,

             from C:\Users\Adam\Documents\Arduino\libraries\SdFat\src/FatLib/ArduinoFiles.h:33,

             from C:\Users\Adam\Documents\Arduino\libraries\SdFat\src/FatLib/FatLib.h:27,

             from C:\Users\Adam\Documents\Arduino\libraries\SdFat\src/SdFat.h:33,

             from C:\Users\Adam\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.1\libraries\SDFS\src/SDFS.h:35,

             from C:\Users\Adam\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.1\libraries\SD\src/SD.h:25,

             from C:\Users\Adam\Documents\Arduino\libraries\ESP_Mail_Client\src/ESP_Mail_FS.h:116,

             from C:\Users\Adam\Documents\Arduino\libraries\ESP_Mail_Client\src/extras/RFC2047.h:12,

             from C:\Users\Adam\Documents\Arduino\libraries\ESP_Mail_Client\src/ESP_Mail_Client.h:39,

             from C:\Users\Adam\Documents\Arduino\23-8-9_leakdetectorWiFiEmail\23-8-9_leakdetectorWiFiEmail.ino:18:

C:\Users\Adam\Documents\Arduino\libraries\SdFat\src/FatLib/FatStructs.h:822:23: note: 'uint8_t FAT_SECOND(uint16_t)' previously defined here

822 | static inline uint8_t FAT_SECOND(uint16_t fatTime) {

  |                       ^~~~~~~~~~

In file included from C:\Users\Adam\Documents\Arduino\libraries\ESP_Mail_Client\src/extras/RFC2047.h:13,

             from C:\Users\Adam\Documents\Arduino\libraries\ESP_Mail_Client\src/ESP_Mail_Client.h:39,

             from C:\Users\Adam\Documents\Arduino\23-8-9_leakdetectorWiFiEmail\23-8-9_leakdetectorWiFiEmail.ino:18:

C:\Users\Adam\Documents\Arduino\libraries\ESP_Mail_Client\src/extras/MB_FS.h: In member function 'bool MB_FS::sdBegin(int, int, int, int, uint32_t)':

C:\Users\Adam\Documents\Arduino\libraries\ESP_Mail_Client\src/extras/MB_FS.h:186:37: error: cannot convert 'SPISettings' to 'uint32_t' {aka 'unsigned int'}

186 | sd_rdy = MBFS_SD_FS.begin(ss);

  |                                     ^

  |                                     |

  |                                     SPISettings

In file included from C:\Users\Adam\Documents\Arduino\libraries\ESP_Mail_Client\src/ESP_Mail_FS.h:116,

             from C:\Users\Adam\Documents\Arduino\libraries\ESP_Mail_Client\src/extras/RFC2047.h:12,

             from C:\Users\Adam\Documents\Arduino\libraries\ESP_Mail_Client\src/ESP_Mail_Client.h:39,

             from C:\Users\Adam\Documents\Arduino\23-8-9_leakdetectorWiFiEmail\23-8-9_leakdetectorWiFiEmail.ino:18:

C:\Users\Adam\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.1\libraries\SD\src/SD.h:35:40: note: initializing argument 2 of 'bool SDClass::begin(uint8_t, uint32_t)'

35 | bool begin(uint8_t csPin, uint32_t cfg = SPI_HALF_SPEED) {

Multiple libraries were found for "SD.h"

Used: C:\Users\Adam\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.1\libraries\SD

Not used: C:\Users\Adam\Documents\Arduino\libraries\SD

exit status 1

Error compiling for board Generic ESP8266 Module.

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

Directory of C:\Users\Adam\Documents\Arduino\libraries

  • Adafruit_Unified_Sensor
  • ArduinoJson
  • AsyncTCP
  • DHT_sensor_library
  • DHT_sensor_library_for_ESPx
  • DS3232RTC
  • esp8266
  • ESPAsyncWebServer
  • ESP_Mail_Client
  • FabioCuomo-DS3231
  • HX711_Arduino_Library
  • Low-Power
  • narcoleptic
  • painlessMesh
  • REBL_UI
  • RTClib
  • SD
  • SdFat
  • Sleep_n0m1
  • Streaming
  • TaskScheduler
  • Time

I moved SD and SdFat around. SD used to be in C:\Program Files (x86)\Arduino\libraries and I moved a related library C:\Users\Adam\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.1\libraries\ESP8266SdFat
to desktop. The number of errors did not really reduce. Any suggestions?

Oh, I also tried compiling it with "ESP32 Dev Module" board with no luck.

It seems that the Arduino SD and SDFat libraries are incompatible with this project. Try to remove it from libraries folder, but restore the 8266 specific libraris like ESP8266SdFat

You are a god. Thank you. Compiles! And uploads!!

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.