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

Cannot compile :c #556

Open
SliceN64 opened this issue Jul 7, 2024 · 6 comments
Open

Cannot compile :c #556

SliceN64 opened this issue Jul 7, 2024 · 6 comments

Comments

@SliceN64
Copy link

SliceN64 commented Jul 7, 2024

I cannot compile because

Compilation error: call of overloaded 'getParam(int)' is ambiguous

Can anyone help me?

This is the full error:

C:\Users\danie\Desktop\gbs-control\gbs-control.ino: In lambda function:
C:\Users\danie\Desktop\gbs-control\gbs-control.ino:9545:59: error: call of overloaded 'getParam(int)' is ambiguous
                 AsyncWebParameter *p = request->getParam(0);
                                                           ^
C:\Users\danie\Desktop\gbs-control\gbs-control.ino:9545:59: note: candidates are:
In file included from C:\Users\danie\Desktop\gbs-control\gbs-control.ino:70:0:
c:\Users\danie\Documents\Arduino\libraries\ESP_Async_WebServer\src/ESPAsyncWebServer.h:360:30: note: const AsyncWebParameter* AsyncWebServerRequest::getParam(const char*, bool, bool) const
     const AsyncWebParameter* getParam(const char* name, bool post = false, bool file = false) const;
                              ^
c:\Users\danie\Documents\Arduino\libraries\ESP_Async_WebServer\src/ESPAsyncWebServer.h:362:30: note: const AsyncWebParameter* AsyncWebServerRequest::getParam(const String&, bool, bool) const
     const AsyncWebParameter* getParam(const String& name, bool post = false, bool file = false) const { return getParam(name.c_str(), post, file); };
                              ^
c:\Users\danie\Documents\Arduino\libraries\ESP_Async_WebServer\src/ESPAsyncWebServer.h:373:30: note: const AsyncWebParameter* AsyncWebServerRequest::getParam(size_t) const
     const AsyncWebParameter* getParam(size_t num) const;
                              ^
C:\Users\danie\Desktop\gbs-control\gbs-control.ino: In lambda function:
C:\Users\danie\Desktop\gbs-control\gbs-control.ino:9564:59: error: call of overloaded 'getParam(int)' is ambiguous
                 AsyncWebParameter *p = request->getParam(0);
                                                           ^
C:\Users\danie\Desktop\gbs-control\gbs-control.ino:9564:59: note: candidates are:
In file included from C:\Users\danie\Desktop\gbs-control\gbs-control.ino:70:0:
c:\Users\danie\Documents\Arduino\libraries\ESP_Async_WebServer\src/ESPAsyncWebServer.h:360:30: note: const AsyncWebParameter* AsyncWebServerRequest::getParam(const char*, bool, bool) const
     const AsyncWebParameter* getParam(const char* name, bool post = false, bool file = false) const;
                              ^
c:\Users\danie\Documents\Arduino\libraries\ESP_Async_WebServer\src/ESPAsyncWebServer.h:362:30: note: const AsyncWebParameter* AsyncWebServerRequest::getParam(const String&, bool, bool) const
     const AsyncWebParameter* getParam(const String& name, bool post = false, bool file = false) const { return getParam(name.c_str(), post, file); };
                              ^
c:\Users\danie\Documents\Arduino\libraries\ESP_Async_WebServer\src/ESPAsyncWebServer.h:373:30: note: const AsyncWebParameter* AsyncWebServerRequest::getParam(size_t) const
     const AsyncWebParameter* getParam(size_t num) const;
                              ^
C:\Users\danie\Desktop\gbs-control\gbs-control.ino: In lambda function:
C:\Users\danie\Desktop\gbs-control\gbs-control.ino:9626:67: error: call of overloaded 'getParam(int)' is ambiguous
                 AsyncWebParameter *slotParam = request->getParam(0);
                                                                   ^
C:\Users\danie\Desktop\gbs-control\gbs-control.ino:9626:67: note: candidates are:
In file included from C:\Users\danie\Desktop\gbs-control\gbs-control.ino:70:0:
c:\Users\danie\Documents\Arduino\libraries\ESP_Async_WebServer\src/ESPAsyncWebServer.h:360:30: note: const AsyncWebParameter* AsyncWebServerRequest::getParam(const char*, bool, bool) const
     const AsyncWebParameter* getParam(const char* name, bool post = false, bool file = false) const;
                              ^
c:\Users\danie\Documents\Arduino\libraries\ESP_Async_WebServer\src/ESPAsyncWebServer.h:362:30: note: const AsyncWebParameter* AsyncWebServerRequest::getParam(const String&, bool, bool) const
     const AsyncWebParameter* getParam(const String& name, bool post = false, bool file = false) const { return getParam(name.c_str(), post, file); };
                              ^
c:\Users\danie\Documents\Arduino\libraries\ESP_Async_WebServer\src/ESPAsyncWebServer.h:373:30: note: const AsyncWebParameter* AsyncWebServerRequest::getParam(size_t) const
     const AsyncWebParameter* getParam(size_t num) const;
                              ^
C:\Users\danie\Desktop\gbs-control\gbs-control.ino: In lambda function:
C:\Users\danie\Desktop\gbs-control\gbs-control.ino:9673:72: error: call of overloaded 'getParam(int)' is ambiguous
                 AsyncWebParameter *slotIndexParam = request->getParam(0);
                                                                        ^
C:\Users\danie\Desktop\gbs-control\gbs-control.ino:9673:72: note: candidates are:
In file included from C:\Users\danie\Desktop\gbs-control\gbs-control.ino:70:0:
c:\Users\danie\Documents\Arduino\libraries\ESP_Async_WebServer\src/ESPAsyncWebServer.h:360:30: note: const AsyncWebParameter* AsyncWebServerRequest::getParam(const char*, bool, bool) const
     const AsyncWebParameter* getParam(const char* name, bool post = false, bool file = false) const;
                              ^
c:\Users\danie\Documents\Arduino\libraries\ESP_Async_WebServer\src/ESPAsyncWebServer.h:362:30: note: const AsyncWebParameter* AsyncWebServerRequest::getParam(const String&, bool, bool) const
     const AsyncWebParameter* getParam(const String& name, bool post = false, bool file = false) const { return getParam(name.c_str(), post, file); };
                              ^
c:\Users\danie\Documents\Arduino\libraries\ESP_Async_WebServer\src/ESPAsyncWebServer.h:373:30: note: const AsyncWebParameter* AsyncWebServerRequest::getParam(size_t) const
     const AsyncWebParameter* getParam(size_t num) const;
                              ^
C:\Users\danie\Desktop\gbs-control\gbs-control.ino:9681:71: error: invalid conversion from 'const AsyncWebParameter*' to 'AsyncWebParameter*' [-fpermissive]
                 AsyncWebParameter *slotNameParam = request->getParam(1);
                                                                       ^
C:\Users\danie\Desktop\gbs-control\gbs-control.ino: In lambda function:
C:\Users\danie\Desktop\gbs-control\gbs-control.ino:9711:51: error: call of overloaded 'getParam(int)' is ambiguous
         AsyncWebParameter *p = request->getParam(0);
                                                   ^
C:\Users\danie\Desktop\gbs-control\gbs-control.ino:9711:51: note: candidates are:
In file included from C:\Users\danie\Desktop\gbs-control\gbs-control.ino:70:0:
c:\Users\danie\Documents\Arduino\libraries\ESP_Async_WebServer\src/ESPAsyncWebServer.h:360:30: note: const AsyncWebParameter* AsyncWebServerRequest::getParam(const char*, bool, bool) const
     const AsyncWebParameter* getParam(const char* name, bool post = false, bool file = false) const;
                              ^
c:\Users\danie\Documents\Arduino\libraries\ESP_Async_WebServer\src/ESPAsyncWebServer.h:362:30: note: const AsyncWebParameter* AsyncWebServerRequest::getParam(const String&, bool, bool) const
     const AsyncWebParameter* getParam(const String& name, bool post = false, bool file = false) const { return getParam(name.c_str(), post, file); };
                              ^
c:\Users\danie\Documents\Arduino\libraries\ESP_Async_WebServer\src/ESPAsyncWebServer.h:373:30: note: const AsyncWebParameter* AsyncWebServerRequest::getParam(size_t) const
     const AsyncWebParameter* getParam(size_t num) const;
                              ^
C:\Users\danie\Desktop\gbs-control\gbs-control.ino: In lambda function:
C:\Users\danie\Desktop\gbs-control\gbs-control.ino:9806:58: error: call of overloaded 'getParam(int)' is ambiguous
                 request->send(SPIFFS, request->getParam(0)->value(), String(), true);
                                                          ^
C:\Users\danie\Desktop\gbs-control\gbs-control.ino:9806:58: note: candidates are:
In file included from C:\Users\danie\Desktop\gbs-control\gbs-control.ino:70:0:
c:\Users\danie\Documents\Arduino\libraries\ESP_Async_WebServer\src/ESPAsyncWebServer.h:360:30: note: const AsyncWebParameter* AsyncWebServerRequest::getParam(const char*, bool, bool) const
     const AsyncWebParameter* getParam(const char* name, bool post = false, bool file = false) const;
                              ^
c:\Users\danie\Documents\Arduino\libraries\ESP_Async_WebServer\src/ESPAsyncWebServer.h:362:30: note: const AsyncWebParameter* AsyncWebServerRequest::getParam(const String&, bool, bool) const
     const AsyncWebParameter* getParam(const String& name, bool post = false, bool file = false) const { return getParam(name.c_str(), post, file); };
                              ^
c:\Users\danie\Documents\Arduino\libraries\ESP_Async_WebServer\src/ESPAsyncWebServer.h:373:30: note: const AsyncWebParameter* AsyncWebServerRequest::getParam(size_t) const
     const AsyncWebParameter* getParam(size_t num) const;
                              ^

exit status 1

Compilation error: call of overloaded 'getParam(int)' is ambiguous
@rajelaran
Copy link

I get the same when trying to build the current codebase according to the Wiki.

@TurboMastodon
Copy link

I get the same when trying to build the current codebase according to the Wiki.

That's exactly what is happening to me as well.

@ramapcsx2
Copy link
Owner

ramapcsx2 commented Jul 28, 2024

"c:\Users\danie\Documents\Arduino\libraries\ESP_Async_WebServer\src/ESPAsyncWebServer.h"
Try to find newer (or older) versions of the "ESPAsyncWebServer" Arduino library.
The code you're trying to build might have been updated, and require the 3rd party libraries to also be updated. Arduino doesn't make this very easy.
(Note: In case you're trying to build older GBSC code, then you might have a too new version of the library. In that case, you'd need to downgrade it.)

@Pr3ttyF1y
Copy link

Don't update your packages in the IDE. Just download the repository linked in the wiki. I had the same error as I updated my packages from the IDE, but rolling it back and manually extracting the zip from the link to the code in the wiki allows it to compile.

@Chandler-Kluser
Copy link

Don't update your packages in the IDE. Just download the repository linked in the wiki. I had the same error as I updated my packages from the IDE, but rolling it back and manually extracting the zip from the link to the code in the wiki allows it to compile.

This is not true, there is no static libraries in gbs-control repository to be used as packages. In order to fully compile the esp8266 firmware you must use the packages from the IDE.

The issue is not using IDE to download the packages, but the packages versions theirselves. I was fully able to build the firmware with:

Wire at version 1.0
ESP8266_and_ESP32_OLED_driver_for_SSD1306_displays at version 4.6.1
ESP8266WiFi at version 1.0
ESPAsyncTCP at version 1.2.4
ESP_Async_WebServer at version 2.6.0
Hash at version 1.0
DNSServer at version 1.1.1
ESP8266mDNS at version 1.2
ArduinoOTA at version 1.0

reminding only to use esp8266 at version 2.6.3 in boards manager as wiki says.

@Chandler-Kluser
Copy link

Just to point out, I only manage to fully run gbscontrol on esp8266 with CPU at 80MHz and using these libraries:

https://github.com/me-no-dev/ESPAsyncTCP
https://github.com/me-no-dev/ESPAsyncWebServer

cloning them into /home/$USER/Arduino/libraries folder

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants