Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compile error with core lib 2.3.0 #576

Closed
2 of 4 tasks
sidey79 opened this issue Mar 26, 2018 · 13 comments
Closed
2 of 4 tasks

Compile error with core lib 2.3.0 #576

sidey79 opened this issue Mar 26, 2018 · 13 comments
Labels
bug Validated BUG DEV Help Wanted Developer Needs Help
Milestone

Comments

@sidey79
Copy link
Contributor

sidey79 commented Mar 26, 2018

Basic Infos

  • I have tested that the issue is present in current development branch (aka latest git).
  • I have searched the issue tracker for a similar issue.
  • If there is a stack dump, I have decoded it.
  • I have filled out all fields below.

Platform

  • Hardware: [ESP-12]
  • Core Version: [2.3.0]
  • Development Env: [|other Visual Studio 2017 with Visual Micro]
  • Operating System: [Windows]

Settings in IDE

  • Module: [Generic ESP8266 Module]
  • Flash Mode: [dio]
  • Flash Size: [1MB]
  • lwip Variant: [unknown]
  • Reset Method: [nodemcu]
  • Flash Frequency: [40Mhz]
  • CPU Frequency: [80Mhz]
  • Upload Using: [SERIAL]
  • Upload Speed: [115200]

Problem Description

Detailed problem description goes here.

The server->on function in core release 2.3.0 is declared with variables from type char* and not with variables from type string as they are used by this lib.

MCVE Sketch

example sketches are affected

Debug Messages

WiFiManager.cpp: In member function void WiFiManager::setupConfigPortal()
 
WiFiManager.cpp: 388:78: error: no matching function for call to 'ESP8266WebServer::on(String, std::_Bind_helper<false, void (WiFiManager::*)(), WiFiManager* const>::type)
   bind(&WiFiManager::handleRoot, this))
WiFiManager.cpp:388: note  candidates are
 
WiFiManager.h:31: In file included from
WiFiManager.cpp:13: from
ESP8266WebServer.h:79: note  void ESP8266WebServer  on(const char*, ESP8266WebServer  THandlerFunction)
   void on(const char* uri, THandlerFunction handler)
ESP8266WebServer.h:79: note    no known conversion for argument 1 from String to const char*
ESP8266WebServer.h:80: note  void ESP8266WebServer  on(const char*, HTTPMethod, ESP8266WebServer  THandlerFunction)
   void on(const char* uri, HTTPMethod method, THandlerFunction fn)
ESP8266WebServer.h:80: note    candidate expects 3 arguments, 2 provided
ESP8266WebServer.h:81: note  void ESP8266WebServer  on(const char*, HTTPMethod, ESP8266WebServer  THandlerFunction, ESP8266WebServer  THandlerFunction)
   void on(const char* uri, HTTPMethod method, THandlerFunction fn, THandlerFunction ufn)
ESP8266WebServer.h:81: note    candidate expects 4 arguments, 2 provided```

@tablatronix
Copy link
Collaborator

Thanks looks like this was changed in 2.4.0
esp8266/Arduino@4dc4e75

@tablatronix
Copy link
Collaborator

how in the hell does one install 2.3.0 on platformio.hmm

@tablatronix tablatronix added this to the dev milestone Mar 27, 2018
@sidey79
Copy link
Contributor Author

sidey79 commented Mar 28, 2018

Sorry, no idea.

It's boring, that the upstream lib is changed that way.

@tablatronix
Copy link
Collaborator

tablatronix commented Mar 28, 2018

I will see about making this backward compatible, not sure how I can use strings and char* and use flash strings, ideas prs welcome

@tablatronix tablatronix added bug Validated BUG DEV Help Wanted Developer Needs Help labels Mar 28, 2018
@sidey79
Copy link
Contributor Author

sidey79 commented Mar 28, 2018

The only think i see is, that it is possible to detect the lib version via #ifdef ....

Something like this:
#ifndef ARDUINO_ESP8266_RELEASE_2_3_0

And depending on the version use seperate code.

Not very well but then it is backward compatible

@abhitheawesomecoder
Copy link

`Arduino: 1.8.5 (Linux), Board: "NodeMCU 1.0 (ESP-12E Module), 80 MHz, 115200, 4M (3M SPIFFS)"

Build options changed, rebuilding all
/home/abhishek/Arduino/libraries/WiFiManager/WiFiManager.cpp: In member function 'void WiFiManager::setupConfigPortal()':
/home/abhishek/Arduino/libraries/WiFiManager/WiFiManager.cpp:440:78: error: no matching function for call to 'ESP8266WebServer::on(String, std::_Bind_helper<false, void (WiFiManager::)(), WiFiManager const>::type)'
server->on((String)FPSTR(R_root), std::bind(&WiFiManager::handleRoot, this));
^
/home/abhishek/Arduino/libraries/WiFiManager/WiFiManager.cpp:440:78: note: candidates are:
In file included from /home/abhishek/Arduino/libraries/WiFiManager/WiFiManager.h:36:0,
from /home/abhishek/Arduino/libraries/WiFiManager/WiFiManager.cpp:13:
/home/abhishek/.arduino15/packages/esp8266/hardware/esp8266/2.3.0/libraries/ESP8266WebServer/src/ESP8266WebServer.h:79:8: note: void ESP8266WebServer::on(const char*, ESP8266WebServer::THandlerFunction)
void on(const char* uri, THandlerFunction handler);
^
/home/abhishek/.arduino15/packages/esp8266/hardware/esp8266/2.3.0/libraries/ESP8266WebServer/src/ESP8266WebServer.h:79:8: note: no known conversion for argument 1 from 'String' to 'const char*'
/home/abhishek/.arduino15/packages/esp8266/hardware/esp8266/2.3.0/libraries/ESP8266WebServer/src/ESP8266WebServer.h:80:8: note: void ESP8266WebServer::on(const char*, HTTPMethod, ESP8266WebServer::THandlerFunction)
void on(const char* uri, HTTPMethod method, THandlerFunction fn);
^
/home/abhishek/.arduino15/packages/esp8266/hardware/esp8266/2.3.0/libraries/ESP8266WebServer/src/ESP8266WebServer.h:80:8: note: candidate expects 3 arguments, 2 provided
/home/abhishek/.arduino15/packages/esp8266/hardware/esp8266/2.3.0/libraries/ESP8266WebServer/src/ESP8266WebServer.h:81:8: note: void ESP8266WebServer::on(const char*, HTTPMethod, ESP8266WebServer::THandlerFunction, ESP8266WebServer::THandlerFunction)
void on(const char* uri, HTTPMethod method, THandlerFunction fn, THandlerFunction ufn);
^
/home/abhishek/.arduino15/packages/esp8266/hardware/esp8266/2.3.0/libraries/ESP8266WebServer/src/ESP8266WebServer.h:81:8: note: candidate expects 4 arguments, 2 provided
/home/abhishek/Arduino/libraries/WiFiManager/WiFiManager.cpp:441:84: error: no matching function for call to 'ESP8266WebServer::on(String, std::_Bind_helper<false, void (WiFiManager::)(unsigned char), WiFiManager const, bool>::type)'
server->on((String)FPSTR(R_wifi), std::bind(&WiFiManager::handleWifi, this, true));
^
/home/abhishek/Arduino/libraries/WiFiManager/WiFiManager.cpp:441:84: note: candidates are:
In file included from /home/abhishek/Arduino/libraries/WiFiManager/WiFiManager.h:36:0,
from /home/abhishek/Arduino/libraries/WiFiManager/WiFiManager.cpp:13:
/home/abhishek/.arduino15/packages/esp8266/hardware/esp8266/2.3.0/libraries/ESP8266WebServer/src/ESP8266WebServer.h:79:8: note: void ESP8266WebServer::on(const char*, ESP8266WebServer::THandlerFunction)
void on(const char* uri, THandlerFunction handler);
^
/home/abhishek/.arduino15/packages/esp8266/hardware/esp8266/2.3.0/libraries/ESP8266WebServer/src/ESP8266WebServer.h:79:8: note: no known conversion for argument 1 from 'String' to 'const char*'
/home/abhishek/.arduino15/packages/esp8266/hardware/esp8266/2.3.0/libraries/ESP8266WebServer/src/ESP8266WebServer.h:80:8: note: void ESP8266WebServer::on(const char*, HTTPMethod, ESP8266WebServer::THandlerFunction)
void on(const char* uri, HTTPMethod method, THandlerFunction fn);
^
/home/abhishek/.arduino15/packages/esp8266/hardware/esp8266/2.3.0/libraries/ESP8266WebServer/src/ESP8266WebServer.h:80:8: note: candidate expects 3 arguments, 2 provided
/home/abhishek/.arduino15/packages/esp8266/hardware/esp8266/2.3.0/libraries/ESP8266WebServer/src/ESP8266WebServer.h:81:8: note: void ESP8266WebServer::on(const char*, HTTPMethod, ESP8266WebServer::THandlerFunction, ESP8266WebServer::THandlerFunction)
void on(const char* uri, HTTPMethod method, THandlerFunction fn, THandlerFunction ufn);
^
/home/abhishek/.arduino15/packages/esp8266/hardware/esp8266/2.3.0/libraries/ESP8266WebServer/src/ESP8266WebServer.h:81:8: note: candidate expects 4 arguments, 2 provided
/home/abhishek/Arduino/libraries/WiFiManager/WiFiManager.cpp:442:91: error: no matching function for call to 'ESP8266WebServer::on(String, std::_Bind_helper<false, void (WiFiManager::)(unsigned char), WiFiManager const, bool>::type)'
server->on((String)FPSTR(R_wifinoscan), std::bind(&WiFiManager::handleWifi, this, false));
^
/home/abhishek/Arduino/libraries/WiFiManager/WiFiManager.cpp:442:91: note: candidates are:
In file included from /home/abhishek/Arduino/libraries/WiFiManager/WiFiManager.h:36:0,
from /home/abhishek/Arduino/libraries/WiFiManager/WiFiManager.cpp:13:
/home/abhishek/.arduino15/packages/esp8266/hardware/esp8266/2.3.0/libraries/ESP8266WebServer/src/ESP8266WebServer.h:79:8: note: void ESP8266WebServer::on(const char*, ESP8266WebServer::THandlerFunction)
void on(const char* uri, THandlerFunction handler);
^
/home/abhishek/.arduino15/packages/esp8266/hardware/esp8266/2.3.0/libraries/ESP8266WebServer/src/ESP8266WebServer.h:79:8: note: no known conversion for argument 1 from 'String' to 'const char*'
/home/abhishek/.arduino15/packages/esp8266/hardware/esp8266/2.3.0/libraries/ESP8266WebServer/src/ESP8266WebServer.h:80:8: note: void ESP8266WebServer::on(const char*, HTTPMethod, ESP8266WebServer::THandlerFunction)
void on(const char* uri, HTTPMethod method, THandlerFunction fn);
^
/home/abhishek/.arduino15/packages/esp8266/hardware/esp8266/2.3.0/libraries/ESP8266WebServer/src/ESP8266WebServer.h:80:8: note: candidate expects 3 arguments, 2 provided
/home/abhishek/.arduino15/packages/esp8266/hardware/esp8266/2.3.0/libraries/ESP8266WebServer/src/ESP8266WebServer.h:81:8: note: void ESP8266WebServer::on(const char*, HTTPMethod, ESP8266WebServer::THandlerFunction, ESP8266WebServer::THandlerFunction)
void on(const char* uri, HTTPMethod method, THandlerFunction fn, THandlerFunction ufn);
^
/home/abhishek/.arduino15/packages/esp8266/hardware/esp8266/2.3.0/libraries/ESP8266WebServer/src/ESP8266WebServer.h:81:8: note: candidate expects 4 arguments, 2 provided
/home/abhishek/Arduino/libraries/WiFiManager/WiFiManager.cpp:443:86: error: no matching function for call to 'ESP8266WebServer::on(String, std::_Bind_helper<false, void (WiFiManager::)(), WiFiManager const>::type)'
server->on((String)FPSTR(R_wifisave), std::bind(&WiFiManager::handleWifiSave, this));
^
/home/abhishek/Arduino/libraries/WiFiManager/WiFiManager.cpp:443:86: note: candidates are:
In file included from /home/abhishek/Arduino/libraries/WiFiManager/WiFiManager.h:36:0,
from /home/abhishek/Arduino/libraries/WiFiManager/WiFiManager.cpp:13:
/home/abhishek/.arduino15/packages/esp8266/hardware/esp8266/2.3.0/libraries/ESP8266WebServer/src/ESP8266WebServer.h:79:8: note: void ESP8266WebServer::on(const char*, ESP8266WebServer::THandlerFunction)
void on(const char* uri, THandlerFunction handler);
^
/home/abhishek/.arduino15/packages/esp8266/hardware/esp8266/2.3.0/libraries/ESP8266WebServer/src/ESP8266WebServer.h:79:8: note: no known conversion for argument 1 from 'String' to 'const char*'
/home/abhishek/.arduino15/packages/esp8266/hardware/esp8266/2.3.0/libraries/ESP8266WebServer/src/ESP8266WebServer.h:80:8: note: void ESP8266WebServer::on(const char*, HTTPMethod, ESP8266WebServer::THandlerFunction)
void on(const char* uri, HTTPMethod method, THandlerFunction fn);
^
/home/abhishek/.arduino15/packages/esp8266/hardware/esp8266/2.3.0/libraries/ESP8266WebServer/src/ESP8266WebServer.h:80:8: note: candidate expects 3 arguments, 2 provided
/home/abhishek/.arduino15/packages/esp8266/hardware/esp8266/2.3.0/libraries/ESP8266WebServer/src/ESP8266WebServer.h:81:8: note: void ESP8266WebServer::on(const char*, HTTPMethod, ESP8266WebServer::THandlerFunction, ESP8266WebServer::THandlerFunction)
void on(const char* uri, HTTPMethod method, THandlerFunction fn, THandlerFunction ufn);
^
/home/abhishek/.arduino15/packages/esp8266/hardware/esp8266/2.3.0/libraries/ESP8266WebServer/src/ESP8266WebServer.h:81:8: note: candidate expects 4 arguments, 2 provided
/home/abhishek/Arduino/libraries/WiFiManager/WiFiManager.cpp:444:78: error: no matching function for call to 'ESP8266WebServer::on(String, std::_Bind_helper<false, void (WiFiManager::)(), WiFiManager const>::type)'
server->on((String)FPSTR(R_info), std::bind(&WiFiManager::handleInfo, this));
^
/home/abhishek/Arduino/libraries/WiFiManager/WiFiManager.cpp:444:78: note: candidates are:
In file included from /home/abhishek/Arduino/libraries/WiFiManager/WiFiManager.h:36:0,
from /home/abhishek/Arduino/libraries/WiFiManager/WiFiManager.cpp:13:
/home/abhishek/.arduino15/packages/esp8266/hardware/esp8266/2.3.0/libraries/ESP8266WebServer/src/ESP8266WebServer.h:79:8: note: void ESP8266WebServer::on(const char*, ESP8266WebServer::THandlerFunction)
void on(const char* uri, THandlerFunction handler);
^
/home/abhishek/.arduino15/packages/esp8266/hardware/esp8266/2.3.0/libraries/ESP8266WebServer/src/ESP8266WebServer.h:79:8: note: no known conversion for argument 1 from 'String' to 'const char*'
/home/abhishek/.arduino15/packages/esp8266/hardware/esp8266/2.3.0/libraries/ESP8266WebServer/src/ESP8266WebServer.h:80:8: note: void ESP8266WebServer::on(const char*, HTTPMethod, ESP8266WebServer::THandlerFunction)
void on(const char* uri, HTTPMethod method, THandlerFunction fn);
^
/home/abhishek/.arduino15/packages/esp8266/hardware/esp8266/2.3.0/libraries/ESP8266WebServer/src/ESP8266WebServer.h:80:8: note: candidate expects 3 arguments, 2 provided
/home/abhishek/.arduino15/packages/esp8266/hardware/esp8266/2.3.0/libraries/ESP8266WebServer/src/ESP8266WebServer.h:81:8: note: void ESP8266WebServer::on(const char*, HTTPMethod, ESP8266WebServer::THandlerFunction, ESP8266WebServer::THandlerFunction)
void on(const char* uri, HTTPMethod method, THandlerFunction fn, THandlerFunction ufn);
^
/home/abhishek/.arduino15/packages/esp8266/hardware/esp8266/2.3.0/libraries/ESP8266WebServer/src/ESP8266WebServer.h:81:8: note: candidate expects 4 arguments, 2 provided
/home/abhishek/Arduino/libraries/WiFiManager/WiFiManager.cpp:445:80: error: no matching function for call to 'ESP8266WebServer::on(String, std::_Bind_helper<false, void (WiFiManager::)(), WiFiManager const>::type)'
server->on((String)FPSTR(R_param), std::bind(&WiFiManager::handleParam, this));
^
/home/abhishek/Arduino/libraries/WiFiManager/WiFiManager.cpp:445:80: note: candidates are:
In file included from /home/abhishek/Arduino/libraries/WiFiManager/WiFiManager.h:36:0,
from /home/abhishek/Arduino/libraries/WiFiManager/WiFiManager.cpp:13:
/home/abhishek/.arduino15/packages/esp8266/hardware/esp8266/2.3.0/libraries/ESP8266WebServer/src/ESP8266WebServer.h:79:8: note: void ESP8266WebServer::on(const char*, ESP8266WebServer::THandlerFunction)
void on(const char* uri, THandlerFunction handler);
^
/home/abhishek/.arduino15/packages/esp8266/hardware/esp8266/2.3.0/libraries/ESP8266WebServer/src/ESP8266WebServer.h:79:8: note: no known conversion for argument 1 from 'String' to 'const char*'
/home/abhishek/.arduino15/packages/esp8266/hardware/esp8266/2.3.0/libraries/ESP8266WebServer/src/ESP8266WebServer.h:80:8: note: void ESP8266WebServer::on(const char*, HTTPMethod, ESP8266WebServer::THandlerFunction)
void on(const char* uri, HTTPMethod method, THandlerFunction fn);
^
/home/abhishek/.arduino15/packages/esp8266/hardware/esp8266/2.3.0/libraries/ESP8266WebServer/src/ESP8266WebServer.h:80:8: note: candidate expects 3 arguments, 2 provided
/home/abhishek/.arduino15/packages/esp8266/hardware/esp8266/2.3.0/libraries/ESP8266WebServer/src/ESP8266WebServer.h:81:8: note: void ESP8266WebServer::on(const char*, HTTPMethod, ESP8266WebServer::THandlerFunction, ESP8266WebServer::THandlerFunction)
void on(const char* uri, HTTPMethod method, THandlerFunction fn, THandlerFunction ufn);
^
/home/abhishek/.arduino15/packages/esp8266/hardware/esp8266/2.3.0/libraries/ESP8266WebServer/src/ESP8266WebServer.h:81:8: note: candidate expects 4 arguments, 2 provided
/home/abhishek/Arduino/libraries/WiFiManager/WiFiManager.cpp:446:88: error: no matching function for call to 'ESP8266WebServer::on(String, std::_Bind_helper<false, void (WiFiManager::)(), WiFiManager const>::type)'
server->on((String)FPSTR(R_paramsave), std::bind(&WiFiManager::handleParamSave, this));
^
/home/abhishek/Arduino/libraries/WiFiManager/WiFiManager.cpp:446:88: note: candidates are:
In file included from /home/abhishek/Arduino/libraries/WiFiManager/WiFiManager.h:36:0,
from /home/abhishek/Arduino/libraries/WiFiManager/WiFiManager.cpp:13:
/home/abhishek/.arduino15/packages/esp8266/hardware/esp8266/2.3.0/libraries/ESP8266WebServer/src/ESP8266WebServer.h:79:8: note: void ESP8266WebServer::on(const char*, ESP8266WebServer::THandlerFunction)
void on(const char* uri, THandlerFunction handler);
^
/home/abhishek/.arduino15/packages/esp8266/hardware/esp8266/2.3.0/libraries/ESP8266WebServer/src/ESP8266WebServer.h:79:8: note: no known conversion for argument 1 from 'String' to 'const char*'
/home/abhishek/.arduino15/packages/esp8266/hardware/esp8266/2.3.0/libraries/ESP8266WebServer/src/ESP8266WebServer.h:80:8: note: void ESP8266WebServer::on(const char*, HTTPMethod, ESP8266WebServer::THandlerFunction)
void on(const char* uri, HTTPMethod method, THandlerFunction fn);
^
/home/abhishek/.arduino15/packages/esp8266/hardware/esp8266/2.3.0/libraries/ESP8266WebServer/src/ESP8266WebServer.h:80:8: note: candidate expects 3 arguments, 2 provided
/home/abhishek/.arduino15/packages/esp8266/hardware/esp8266/2.3.0/libraries/ESP8266WebServer/src/ESP8266WebServer.h:81:8: note: void ESP8266WebServer::on(const char*, HTTPMethod, ESP8266WebServer::THandlerFunction, ESP8266WebServer::THandlerFunction)
void on(const char* uri, HTTPMethod method, THandlerFunction fn, THandlerFunction ufn);
^
/home/abhishek/.arduino15/packages/esp8266/hardware/esp8266/2.3.0/libraries/ESP8266WebServer/src/ESP8266WebServer.h:81:8: note: candidate expects 4 arguments, 2 provided
/home/abhishek/Arduino/libraries/WiFiManager/WiFiManager.cpp:447:82: error: no matching function for call to 'ESP8266WebServer::on(String, std::_Bind_helper<false, void (WiFiManager::)(), WiFiManager const>::type)'
server->on((String)FPSTR(R_restart), std::bind(&WiFiManager::handleReset, this));
^
/home/abhishek/Arduino/libraries/WiFiManager/WiFiManager.cpp:447:82: note: candidates are:
In file included from /home/abhishek/Arduino/libraries/WiFiManager/WiFiManager.h:36:0,
from /home/abhishek/Arduino/libraries/WiFiManager/WiFiManager.cpp:13:
/home/abhishek/.arduino15/packages/esp8266/hardware/esp8266/2.3.0/libraries/ESP8266WebServer/src/ESP8266WebServer.h:79:8: note: void ESP8266WebServer::on(const char*, ESP8266WebServer::THandlerFunction)
void on(const char* uri, THandlerFunction handler);
^
/home/abhishek/.arduino15/packages/esp8266/hardware/esp8266/2.3.0/libraries/ESP8266WebServer/src/ESP8266WebServer.h:79:8: note: no known conversion for argument 1 from 'String' to 'const char*'
/home/abhishek/.arduino15/packages/esp8266/hardware/esp8266/2.3.0/libraries/ESP8266WebServer/src/ESP8266WebServer.h:80:8: note: void ESP8266WebServer::on(const char*, HTTPMethod, ESP8266WebServer::THandlerFunction)
void on(const char* uri, HTTPMethod method, THandlerFunction fn);
^
/home/abhishek/.arduino15/packages/esp8266/hardware/esp8266/2.3.0/libraries/ESP8266WebServer/src/ESP8266WebServer.h:80:8: note: candidate expects 3 arguments, 2 provided
/home/abhishek/.arduino15/packages/esp8266/hardware/esp8266/2.3.0/libraries/ESP8266WebServer/src/ESP8266WebServer.h:81:8: note: void ESP8266WebServer::on(const char*, HTTPMethod, ESP8266WebServer::THandlerFunction, ESP8266WebServer::THandlerFunction)
void on(const char* uri, HTTPMethod method, THandlerFunction fn, THandlerFunction ufn);
^
/home/abhishek/.arduino15/packages/esp8266/hardware/esp8266/2.3.0/libraries/ESP8266WebServer/src/ESP8266WebServer.h:81:8: note: candidate expects 4 arguments, 2 provided
/home/abhishek/Arduino/libraries/WiFiManager/WiFiManager.cpp:448:78: error: no matching function for call to 'ESP8266WebServer::on(String, std::_Bind_helper<false, void (WiFiManager::)(), WiFiManager const>::type)'
server->on((String)FPSTR(R_exit), std::bind(&WiFiManager::handleExit, this));
^
/home/abhishek/Arduino/libraries/WiFiManager/WiFiManager.cpp:448:78: note: candidates are:
In file included from /home/abhishek/Arduino/libraries/WiFiManager/WiFiManager.h:36:0,
from /home/abhishek/Arduino/libraries/WiFiManager/WiFiManager.cpp:13:
/home/abhishek/.arduino15/packages/esp8266/hardware/esp8266/2.3.0/libraries/ESP8266WebServer/src/ESP8266WebServer.h:79:8: note: void ESP8266WebServer::on(const char*, ESP8266WebServer::THandlerFunction)
void on(const char* uri, THandlerFunction handler);
^
/home/abhishek/.arduino15/packages/esp8266/hardware/esp8266/2.3.0/libraries/ESP8266WebServer/src/ESP8266WebServer.h:79:8: note: no known conversion for argument 1 from 'String' to 'const char*'
/home/abhishek/.arduino15/packages/esp8266/hardware/esp8266/2.3.0/libraries/ESP8266WebServer/src/ESP8266WebServer.h:80:8: note: void ESP8266WebServer::on(const char*, HTTPMethod, ESP8266WebServer::THandlerFunction)
void on(const char* uri, HTTPMethod method, THandlerFunction fn);
^
/home/abhishek/.arduino15/packages/esp8266/hardware/esp8266/2.3.0/libraries/ESP8266WebServer/src/ESP8266WebServer.h:80:8: note: candidate expects 3 arguments, 2 provided
/home/abhishek/.arduino15/packages/esp8266/hardware/esp8266/2.3.0/libraries/ESP8266WebServer/src/ESP8266WebServer.h:81:8: note: void ESP8266WebServer::on(const char*, HTTPMethod, ESP8266WebServer::THandlerFunction, ESP8266WebServer::THandlerFunction)
void on(const char* uri, HTTPMethod method, THandlerFunction fn, THandlerFunction ufn);
^
/home/abhishek/.arduino15/packages/esp8266/hardware/esp8266/2.3.0/libraries/ESP8266WebServer/src/ESP8266WebServer.h:81:8: note: candidate expects 4 arguments, 2 provided
/home/abhishek/Arduino/libraries/WiFiManager/WiFiManager.cpp:449:80: error: no matching function for call to 'ESP8266WebServer::on(String, std::_Bind_helper<false, void (WiFiManager::)(), WiFiManager const>::type)'
server->on((String)FPSTR(R_close), std::bind(&WiFiManager::handleClose, this));
^
/home/abhishek/Arduino/libraries/WiFiManager/WiFiManager.cpp:449:80: note: candidates are:
In file included from /home/abhishek/Arduino/libraries/WiFiManager/WiFiManager.h:36:0,
from /home/abhishek/Arduino/libraries/WiFiManager/WiFiManager.cpp:13:
/home/abhishek/.arduino15/packages/esp8266/hardware/esp8266/2.3.0/libraries/ESP8266WebServer/src/ESP8266WebServer.h:79:8: note: void ESP8266WebServer::on(const char*, ESP8266WebServer::THandlerFunction)
void on(const char* uri, THandlerFunction handler);
^
/home/abhishek/.arduino15/packages/esp8266/hardware/esp8266/2.3.0/libraries/ESP8266WebServer/src/ESP8266WebServer.h:79:8: note: no known conversion for argument 1 from 'String' to 'const char*'
/home/abhishek/.arduino15/packages/esp8266/hardware/esp8266/2.3.0/libraries/ESP8266WebServer/src/ESP8266WebServer.h:80:8: note: void ESP8266WebServer::on(const char*, HTTPMethod, ESP8266WebServer::THandlerFunction)
void on(const char* uri, HTTPMethod method, THandlerFunction fn);
^
/home/abhishek/.arduino15/packages/esp8266/hardware/esp8266/2.3.0/libraries/ESP8266WebServer/src/ESP8266WebServer.h:80:8: note: candidate expects 3 arguments, 2 provided
/home/abhishek/.arduino15/packages/esp8266/hardware/esp8266/2.3.0/libraries/ESP8266WebServer/src/ESP8266WebServer.h:81:8: note: void ESP8266WebServer::on(const char*, HTTPMethod, ESP8266WebServer::THandlerFunction, ESP8266WebServer::THandlerFunction)
void on(const char* uri, HTTPMethod method, THandlerFunction fn, THandlerFunction ufn);
^
/home/abhishek/.arduino15/packages/esp8266/hardware/esp8266/2.3.0/libraries/ESP8266WebServer/src/ESP8266WebServer.h:81:8: note: candidate expects 4 arguments, 2 provided
/home/abhishek/Arduino/libraries/WiFiManager/WiFiManager.cpp:450:87: error: no matching function for call to 'ESP8266WebServer::on(String, std::_Bind_helper<false, void (WiFiManager::)(unsigned char), WiFiManager const, bool>::type)'
server->on((String)FPSTR(R_erase), std::bind(&WiFiManager::handleErase, this, false));
^
/home/abhishek/Arduino/libraries/WiFiManager/WiFiManager.cpp:450:87: note: candidates are:
In file included from /home/abhishek/Arduino/libraries/WiFiManager/WiFiManager.h:36:0,
from /home/abhishek/Arduino/libraries/WiFiManager/WiFiManager.cpp:13:
/home/abhishek/.arduino15/packages/esp8266/hardware/esp8266/2.3.0/libraries/ESP8266WebServer/src/ESP8266WebServer.h:79:8: note: void ESP8266WebServer::on(const char*, ESP8266WebServer::THandlerFunction)
void on(const char* uri, THandlerFunction handler);
^
/home/abhishek/.arduino15/packages/esp8266/hardware/esp8266/2.3.0/libraries/ESP8266WebServer/src/ESP8266WebServer.h:79:8: note: no known conversion for argument 1 from 'String' to 'const char*'
/home/abhishek/.arduino15/packages/esp8266/hardware/esp8266/2.3.0/libraries/ESP8266WebServer/src/ESP8266WebServer.h:80:8: note: void ESP8266WebServer::on(const char*, HTTPMethod, ESP8266WebServer::THandlerFunction)
void on(const char* uri, HTTPMethod method, THandlerFunction fn);
^
/home/abhishek/.arduino15/packages/esp8266/hardware/esp8266/2.3.0/libraries/ESP8266WebServer/src/ESP8266WebServer.h:80:8: note: candidate expects 3 arguments, 2 provided
/home/abhishek/.arduino15/packages/esp8266/hardware/esp8266/2.3.0/libraries/ESP8266WebServer/src/ESP8266WebServer.h:81:8: note: void ESP8266WebServer::on(const char*, HTTPMethod, ESP8266WebServer::THandlerFunction, ESP8266WebServer::THandlerFunction)
void on(const char* uri, HTTPMethod method, THandlerFunction fn, THandlerFunction ufn);
^
/home/abhishek/.arduino15/packages/esp8266/hardware/esp8266/2.3.0/libraries/ESP8266WebServer/src/ESP8266WebServer.h:81:8: note: candidate expects 4 arguments, 2 provided
/home/abhishek/Arduino/libraries/WiFiManager/WiFiManager.cpp:451:86: error: no matching function for call to 'ESP8266WebServer::on(String, std::_Bind_helper<false, void (WiFiManager::)(), WiFiManager const>::type)'
server->on((String)FPSTR(R_status), std::bind(&WiFiManager::handleWiFiStatus, this));
^
/home/abhishek/Arduino/libraries/WiFiManager/WiFiManager.cpp:451:86: note: candidates are:
In file included from /home/abhishek/Arduino/libraries/WiFiManager/WiFiManager.h:36:0,
from /home/abhishek/Arduino/libraries/WiFiManager/WiFiManager.cpp:13:
/home/abhishek/.arduino15/packages/esp8266/hardware/esp8266/2.3.0/libraries/ESP8266WebServer/src/ESP8266WebServer.h:79:8: note: void ESP8266WebServer::on(const char*, ESP8266WebServer::THandlerFunction)
void on(const char* uri, THandlerFunction handler);
^
/home/abhishek/.arduino15/packages/esp8266/hardware/esp8266/2.3.0/libraries/ESP8266WebServer/src/ESP8266WebServer.h:79:8: note: no known conversion for argument 1 from 'String' to 'const char*'
/home/abhishek/.arduino15/packages/esp8266/hardware/esp8266/2.3.0/libraries/ESP8266WebServer/src/ESP8266WebServer.h:80:8: note: void ESP8266WebServer::on(const char*, HTTPMethod, ESP8266WebServer::THandlerFunction)
void on(const char* uri, HTTPMethod method, THandlerFunction fn);
^
/home/abhishek/.arduino15/packages/esp8266/hardware/esp8266/2.3.0/libraries/ESP8266WebServer/src/ESP8266WebServer.h:80:8: note: candidate expects 3 arguments, 2 provided
/home/abhishek/.arduino15/packages/esp8266/hardware/esp8266/2.3.0/libraries/ESP8266WebServer/src/ESP8266WebServer.h:81:8: note: void ESP8266WebServer::on(const char*, HTTPMethod, ESP8266WebServer::THandlerFunction, ESP8266WebServer::THandlerFunction)
void on(const char* uri, HTTPMethod method, THandlerFunction fn, THandlerFunction ufn);
^
/home/abhishek/.arduino15/packages/esp8266/hardware/esp8266/2.3.0/libraries/ESP8266WebServer/src/ESP8266WebServer.h:81:8: note: candidate expects 4 arguments, 2 provided
/home/abhishek/Arduino/libraries/WiFiManager/WiFiManager.cpp: In member function 'bool WiFiManager::WiFi_scanNetworks(bool, bool)':
/home/abhishek/Arduino/libraries/WiFiManager/WiFiManager.cpp:1001:14: error: 'class ESP8266WiFiClass' has no member named 'scanNetworksAsync'
WiFi.scanNetworksAsync(std::bind(&WiFiManager::WiFi_scanComplete,this,_1));
^
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.
`

@tablatronix
Copy link
Collaborator

Yeah the event func was changed in 2.4 and not backward compatible.

tablatronix added a commit that referenced this issue Sep 7, 2018
asyncscannetworks not available in esp8266 2.3.0, adjusted server on to take cstr for backwards compatability
@tablatronix
Copy link
Collaborator

using server->on(String(FPSTR(R_root)).c_str(), for both compatability

@bayazidsustami
Copy link

it's not work on my pc

@tablatronix
Copy link
Collaborator

These changes are only in the development branch at the moment.

tablatronix pushed a commit that referenced this issue Nov 8, 2018
@tablatronix tablatronix mentioned this issue Nov 8, 2018
@tablatronix
Copy link
Collaborator

hotfixed

@MEHUL95
Copy link

MEHUL95 commented Dec 30, 2018

using server->on(String(FPSTR(R_root)).c_str(), for both compatability

May I know where to add this line in WifiManager.cpp?

@tomgillespy
Copy link

@MEHUL95 if you still need this you see where you need to change it by clicking on the commit hash on the left next to the commit that made the change above. I've just amended the file and it works fine now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Validated BUG DEV Help Wanted Developer Needs Help
Projects
None yet
Development

No branches or pull requests

6 participants