ct-Open-Source / Basecamp

An Arduino library to ease the use of the ESP32 in IoT projects
GNU General Public License v3.0
254 stars 48 forks source link

Fehler beim Kompilieren von Basecamp mit Beispielsketch und Asynctcp.h #73

Open gsandreas opened 5 years ago

gsandreas commented 5 years ago

Hi,

Ich versuche folgenden Sketch zu kompilieren:

#include <Basecamp.hpp>
Basecamp iot;

void setup() {
  iot.begin();
    //The mqtt object is an instance of Async MQTT Client. See it's documentation for details.
    iot.mqtt.subscribe("test/lol",2);

    //Use the web object to add elements to the interface
    iot.web.addInterfaceElement("color", "input", "", "#configform", "LampColor");
    iot.web.setInterfaceElementAttribute("color", "type", "text");

}

void loop() {
  //your code
}

Nun bekomme ich eine Reihe von Kompilierfehlern:

C:\Users\Andreas\Documents\Arduino\libraries\AsyncTCP-master\src\AsyncTCP.cpp:259:27: error: field 'call' has incomplete type 'tcpip_api_call'

     struct tcpip_api_call call;

                           ^

C:\Users\Andreas\Documents\Arduino\libraries\AsyncTCP-master\src\AsyncTCP.cpp:259:12: note: forward declaration of 'struct tcpip_api_call'

     struct tcpip_api_call call;

            ^

C:\Users\Andreas\Documents\Arduino\libraries\AsyncTCP-master\src\AsyncTCP.cpp: In function 'esp_err_t _tcp_output(tcp_pcb*)':

C:\Users\Andreas\Documents\Arduino\libraries\AsyncTCP-master\src\AsyncTCP.cpp:291:65: error: invalid conversion from 'err_t (*)(tcpip_api_call*) {aka signed char (*)(tcpip_api_call*)}' to 'tcpip_api_call_fn {aka signed char (*)(tcpip_api_call_data*)}' [-fpermissive]

     tcpip_api_call(_tcp_output_api, (struct tcpip_api_call*)&msg);

                                                                 ^

C:\Users\Andreas\Documents\Arduino\libraries\AsyncTCP-master\src\AsyncTCP.cpp:291:65: error: cannot convert 'tcpip_api_call*' to 'tcpip_api_call_data*' for argument '2' to 'err_t tcpip_api_call(tcpip_api_call_fn, tcpip_api_call_data*)'

C:\Users\Andreas\Documents\Arduino\libraries\AsyncTCP-master\src\AsyncTCP.cpp:259:12: note: class type 'tcpip_api_call' is incomplete

     struct tcpip_api_call call;

            ^

C:\Users\Andreas\Documents\Arduino\libraries\AsyncTCP-master\src\AsyncTCP.cpp: In function 'esp_err_t _tcp_write(tcp_pcb*, const char*, size_t, uint8_t)':

C:\Users\Andreas\Documents\Arduino\libraries\AsyncTCP-master\src\AsyncTCP.cpp:307:64: error: invalid conversion from 'err_t (*)(tcpip_api_call*) {aka signed char (*)(tcpip_api_call*)}' to 'tcpip_api_call_fn {aka signed char (*)(tcpip_api_call_data*)}' [-fpermissive]

     tcpip_api_call(_tcp_write_api, (struct tcpip_api_call*)&msg);

                                                                ^

C:\Users\Andreas\Documents\Arduino\libraries\AsyncTCP-master\src\AsyncTCP.cpp:307:64: error: cannot convert 'tcpip_api_call*' to 'tcpip_api_call_data*' for argument '2' to 'err_t tcpip_api_call(tcpip_api_call_fn, tcpip_api_call_data*)'

C:\Users\Andreas\Documents\Arduino\libraries\AsyncTCP-master\src\AsyncTCP.cpp:259:12: note: class type 'tcpip_api_call' is incomplete

     struct tcpip_api_call call;

            ^

C:\Users\Andreas\Documents\Arduino\libraries\AsyncTCP-master\src\AsyncTCP.cpp: In function 'esp_err_t _tcp_recved(tcp_pcb*, size_t)':

C:\Users\Andreas\Documents\Arduino\libraries\AsyncTCP-master\src\AsyncTCP.cpp:322:65: error: invalid conversion from 'err_t (*)(tcpip_api_call*) {aka signed char (*)(tcpip_api_call*)}' to 'tcpip_api_call_fn {aka signed char (*)(tcpip_api_call_data*)}' [-fpermissive]

     tcpip_api_call(_tcp_recved_api, (struct tcpip_api_call*)&msg);

                                                                 ^

C:\Users\Andreas\Documents\Arduino\libraries\AsyncTCP-master\src\AsyncTCP.cpp:322:65: error: cannot convert 'tcpip_api_call*' to 'tcpip_api_call_data*' for argument '2' to 'err_t tcpip_api_call(tcpip_api_call_fn, tcpip_api_call_data*)'

C:\Users\Andreas\Documents\Arduino\libraries\AsyncTCP-master\src\AsyncTCP.cpp:259:12: note: class type 'tcpip_api_call' is incomplete

     struct tcpip_api_call call;

            ^

C:\Users\Andreas\Documents\Arduino\libraries\AsyncTCP-master\src\AsyncTCP.cpp: In function 'esp_err_t _tcp_connect(tcp_pcb*, ip_addr_t*, uint16_t, tcp_connected_fn)':

C:\Users\Andreas\Documents\Arduino\libraries\AsyncTCP-master\src\AsyncTCP.cpp:338:66: error: invalid conversion from 'err_t (*)(tcpip_api_call*) {aka signed char (*)(tcpip_api_call*)}' to 'tcpip_api_call_fn {aka signed char (*)(tcpip_api_call_data*)}' [-fpermissive]

     tcpip_api_call(_tcp_connect_api, (struct tcpip_api_call*)&msg);

                                                                  ^

C:\Users\Andreas\Documents\Arduino\libraries\AsyncTCP-master\src\AsyncTCP.cpp:338:66: error: cannot convert 'tcpip_api_call*' to 'tcpip_api_call_data*' for argument '2' to 'err_t tcpip_api_call(tcpip_api_call_fn, tcpip_api_call_data*)'

C:\Users\Andreas\Documents\Arduino\libraries\AsyncTCP-master\src\AsyncTCP.cpp:259:12: note: class type 'tcpip_api_call' is incomplete

     struct tcpip_api_call call;

            ^

C:\Users\Andreas\Documents\Arduino\libraries\AsyncTCP-master\src\AsyncTCP.cpp: In function 'esp_err_t _tcp_close(tcp_pcb*)':

C:\Users\Andreas\Documents\Arduino\libraries\AsyncTCP-master\src\AsyncTCP.cpp:352:64: error: invalid conversion from 'err_t (*)(tcpip_api_call*) {aka signed char (*)(tcpip_api_call*)}' to 'tcpip_api_call_fn {aka signed char (*)(tcpip_api_call_data*)}' [-fpermissive]

     tcpip_api_call(_tcp_close_api, (struct tcpip_api_call*)&msg);

                                                                ^

C:\Users\Andreas\Documents\Arduino\libraries\AsyncTCP-master\src\AsyncTCP.cpp:352:64: error: cannot convert 'tcpip_api_call*' to 'tcpip_api_call_data*' for argument '2' to 'err_t tcpip_api_call(tcpip_api_call_fn, tcpip_api_call_data*)'

C:\Users\Andreas\Documents\Arduino\libraries\AsyncTCP-master\src\AsyncTCP.cpp:259:12: note: class type 'tcpip_api_call' is incomplete

     struct tcpip_api_call call;

            ^

C:\Users\Andreas\Documents\Arduino\libraries\AsyncTCP-master\src\AsyncTCP.cpp: In function 'esp_err_t _tcp_abort(tcp_pcb*)':

C:\Users\Andreas\Documents\Arduino\libraries\AsyncTCP-master\src\AsyncTCP.cpp:367:64: error: invalid conversion from 'err_t (*)(tcpip_api_call*) {aka signed char (*)(tcpip_api_call*)}' to 'tcpip_api_call_fn {aka signed char (*)(tcpip_api_call_data*)}' [-fpermissive]

     tcpip_api_call(_tcp_abort_api, (struct tcpip_api_call*)&msg);

                                                                ^

C:\Users\Andreas\Documents\Arduino\libraries\AsyncTCP-master\src\AsyncTCP.cpp:367:64: error: cannot convert 'tcpip_api_call*' to 'tcpip_api_call_data*' for argument '2' to 'err_t tcpip_api_call(tcpip_api_call_fn, tcpip_api_call_data*)'

C:\Users\Andreas\Documents\Arduino\libraries\AsyncTCP-master\src\AsyncTCP.cpp:259:12: note: class type 'tcpip_api_call' is incomplete

     struct tcpip_api_call call;

            ^

C:\Users\Andreas\Documents\Arduino\libraries\AsyncTCP-master\src\AsyncTCP.cpp: In function 'esp_err_t _tcp_bind(tcp_pcb*, ip_addr_t*, uint16_t)':

C:\Users\Andreas\Documents\Arduino\libraries\AsyncTCP-master\src\AsyncTCP.cpp:382:63: error: invalid conversion from 'err_t (*)(tcpip_api_call*) {aka signed char (*)(tcpip_api_call*)}' to 'tcpip_api_call_fn {aka signed char (*)(tcpip_api_call_data*)}' [-fpermissive]

     tcpip_api_call(_tcp_bind_api, (struct tcpip_api_call*)&msg);

                                                               ^

C:\Users\Andreas\Documents\Arduino\libraries\AsyncTCP-master\src\AsyncTCP.cpp:382:63: error: cannot convert 'tcpip_api_call*' to 'tcpip_api_call_data*' for argument '2' to 'err_t tcpip_api_call(tcpip_api_call_fn, tcpip_api_call_data*)'

C:\Users\Andreas\Documents\Arduino\libraries\AsyncTCP-master\src\AsyncTCP.cpp:259:12: note: class type 'tcpip_api_call' is incomplete

     struct tcpip_api_call call;

            ^

C:\Users\Andreas\Documents\Arduino\libraries\AsyncTCP-master\src\AsyncTCP.cpp: In function 'tcp_pcb* _tcp_listen_with_backlog(tcp_pcb*, uint8_t)':

C:\Users\Andreas\Documents\Arduino\libraries\AsyncTCP-master\src\AsyncTCP.cpp:397:65: error: invalid conversion from 'err_t (*)(tcpip_api_call*) {aka signed char (*)(tcpip_api_call*)}' to 'tcpip_api_call_fn {aka signed char (*)(tcpip_api_call_data*)}' [-fpermissive]

     tcpip_api_call(_tcp_listen_api, (struct tcpip_api_call*)&msg);

                                                                 ^

C:\Users\Andreas\Documents\Arduino\libraries\AsyncTCP-master\src\AsyncTCP.cpp:397:65: error: cannot convert 'tcpip_api_call*' to 'tcpip_api_call_data*' for argument '2' to 'err_t tcpip_api_call(tcpip_api_call_fn, tcpip_api_call_data*)'

C:\Users\Andreas\Documents\Arduino\libraries\AsyncTCP-master\src\AsyncTCP.cpp:259:12: note: class type 'tcpip_api_call' is incomplete

     struct tcpip_api_call call;

            ^

C:\Users\Andreas\Documents\Arduino\libraries\AsyncTCP-master\src\AsyncTCP.cpp: At global scope:

C:\Users\Andreas\Documents\Arduino\libraries\AsyncTCP-master\src\AsyncTCP.cpp:624:6: error: prototype for 'void AsyncClient::_dns_found(ip_addr_t*)' does not match any in class 'AsyncClient'

 void AsyncClient::_dns_found(ip_addr_t *ipaddr){

      ^

In file included from C:\Users\Andreas\Documents\Arduino\libraries\AsyncTCP-master\src\AsyncTCP.cpp:24:0:

C:\Users\Andreas\Documents\Arduino\libraries\AsyncTCP-master\src\AsyncTCP.h:84:10: error: candidate is: void AsyncClient::_dns_found(_ip_addr*)

     void _dns_found(struct _ip_addr *ipaddr);

          ^

C:\Users\Andreas\Documents\Arduino\libraries\AsyncTCP-master\src\AsyncTCP.cpp:946:6: error: prototype for 'void AsyncClient::_s_dns_found(const char*, ip_addr_t*, void*)' does not match any in class 'AsyncClient'

 void AsyncClient::_s_dns_found(const char * name, ip_addr_t * ipaddr, void * arg){

      ^

In file included from C:\Users\Andreas\Documents\Arduino\libraries\AsyncTCP-master\src\AsyncTCP.cpp:24:0:

C:\Users\Andreas\Documents\Arduino\libraries\AsyncTCP-master\src\AsyncTCP.h:164:17: error: candidate is: static void AsyncClient::_s_dns_found(const char*, _ip_addr*, void*)

     static void _s_dns_found(const char *name, struct _ip_addr *ipaddr, void *arg);

                 ^

Mehrere Bibliotheken wurden für "WiFi.h" gefunden
 Benutzt: C:\Users\Andreas\Documents\Arduino\hardware\espressif\esp32\libraries\WiFi
 Nicht benutzt: C:\Program Files (x86)\Arduino\libraries\WiFi
exit status 1
Fehler beim Kompilieren für das Board ESP32 Wrover Module.

Ich verwende folgende Versionen der Module: Arduino 1.8.7 Basecamp 0.1.8 (Downgrade auf 0.1.6 brachte die selben Fehler wie oben) ESPAsyncWebServer (Masterbranch vom 1.11.18) ArduinoJSON (Masterbranch vom 1.11.18, ArduinoJson-5.13.3 keine Änderung, ArduinoJson-6.5.0-beta keine Änderung) Async MQTT Client 0.8.1 (Anpassung in AsyncMqttClient.hpp der Includedatei ESPAsynctcp.h auf Asynctcp.h) AsyncTCP (Masterbranch vom 1.11.18)

Ich hoffe sie können mir weiterhelfen. Ich hab die selben Fehlermeldungen auf zwei unterschiedlichen Rechnern so reproduzieren können.

Grüße Andreas

gsandreas commented 5 years ago

Hi,

Hatte schon jemand Zeit, sich das Problem anzukuggen?

Grüße A. Gaßner

MoisAlexander commented 5 years ago

Hi,

ich hab das Problem auch, kann es sein, dass es an der Arduino 1.8.7 liegt, die hab ich auch allerdings unter Linux. Die benötigten libraries hab ich schon auf den Stand vom Januar 18 gebracht, ohne Erfolg.

Servus

gsandreas commented 5 years ago

Hi,

Hab ich auch schon gedacht, konnte aber nicht sauber auf die im Artikel genannte Version downgraden.

Grüße Andreas

dpunzeng commented 5 years ago

Hallo Ihr, ich hänge auch hier. Bin aber grade noch auf Urlaub. Der Fehler:

„Mehrere Bibliotheken wurden für "WiFi.h" gefunden“ Ist jedenfalls schlecht aber einfach zu fixen. Finde mal die zweite Version und lösche sie raus. LG Dieter

gsandreas commented 5 years ago

Hi,

Ach du meinst die letzte Meldung? Die hätte ich jetzt eher als Warnung verstanden. Weiter oben scheint es weiter zu hacken...

Grüße, Andreas

GO74 commented 5 years ago

Hatte auch solche Meldungen. Habe dann sämtliche manuell gezogenen Anhängigkeiten entfernt und ausschließlich die LIBs aus dem Artikel genommen: ct.de/yha5 Naja, Basecamp ist schon ganz nett, aber die fehlende frei zugängliche dokumentation ... ich fürchte das Ding ist so gut wie gestorben.