xreef / EMailSender

Arduino, esp32, Esp8266 EMailSender with Arduino IDE, simple library to send email via smtp with attachments.
https://www.mischianti.org/category/my-libraries/emailsender-send-email-with-attachments/
MIT License
75 stars 28 forks source link

reference to 'File' is ambiguous #29

Closed minhtinn70 closed 2 years ago

minhtinn70 commented 2 years ago

Hello, Please help me solve this problem

" C:\Users\minht\OneDrive\Documents\Arduino\libraries\EMailSender\EMailSender.h:297:25: error: reference to 'File' is ambiguous" The problem occurs in the file EMailSender.h

image Line 297

xreef commented 2 years ago

Hi, please tell me your configuration and code. Bye Renzo

minhtinn70 commented 2 years ago

Hello, This is the code, the error pointed that " C:\Users\minht\OneDrive\Documents\Arduino\libraries\EMailSender\EMailSender.h:297:25: error: reference to 'File' is ambiguous" which is in file EMailSender.h

I use ESP8266 node MCU, I follow the tutorial of " https://github.com/Neutrino-1/Fitness_Watch ". If you require any further information, let me know. Thanks

This is the all libraries that I use in code

#include "C:\Users\minht\OneDrive\Documents\PlatformIO\Projects\Watch\src\include\main.h"  
void setup()
{
 // put your setup code here, to run once:
  pinMode(navButton, INPUT_PULLUP);
  pinMode(14, OUTPUT);
  attachInterrupt(digitalPinToInterrupt(0), ISR, FALLING);
  Serial.begin(115200);
  Serial.println("Starting...");
  startWiFiManager();
  initDispaly();
  delay(100);
  setupMPU();
  while (wifiConnected())
    ;
  startTime();
  initUI();
  idleTime = millis();
}

void loop()
{
  if (remainingTimeBudget() > 0)
  {
  }

  if (pressed)
  {
    changeFrame();
    pressed = false;
  }

  if (timeStatus() != timeNotSet)
  {
    if (now() != prevDisplay)
    { //update the display only if time has changed
      prevDisplay = now();
      setDisplayTime(digitalClockValue());
      //Serial.println(digitalClockValue());
      // WiFi.mode(WIFI_OFF);
    }
  }

  calculateGraphics();
  if (calculateMotion())
  {
    if (!displayOnStatus)
    {
      onDispaly();
      displayOnStatus = true;
    }
    idleTime = millis();
  }
  else if (!calculateMotion() && displayOnStatus && millis() - idleTime > 15000)
  {
    displayOnStatus = false;
    turnOffDisplay();
    idleTime = millis();
  }

  // put your main code here, to run repeatedly:
}

ICACHE_RAM_ATTR void ISR()
{
  if (!displayOnStatus)
  {
    onDispaly();
    displayOnStatus = false;
  }
  else
  {
    pressed = true;
  }
}
minhtinn70 commented 2 years ago

Hi, please tell me your configuration and code. Bye Renzo

Hello Renzo, pls reply me.

xreef commented 2 years ago

Sorry I'm on holiday and I can't check it. Bye Renzo

xreef commented 2 years ago

Hi, I think that I can't find the problem without building all the projects sorry. The library EMailSender for esp8266 works correctly.

Try to ask the project creator if He uses some particular version or configuration. Bye Renzo