Edzelf / Esp-radio

Internet radio based on Esp8266 and VS1053.
MIT License
625 stars 200 forks source link

Current version with latest libraries fails to compile #109

Open Uksa007 opened 7 years ago

Uksa007 commented 7 years ago

Using a WeMos D1 mini getting the following compile errors. Only change made was to comment out USETFT as I don't have a screen. // #define USETFT

Looks like ESPAsyncTCP was updated yesterday to "Fix compilation errors a day ago" Maybe this has broken it, maybe someone can attach a working version of the library? Any other ideas?

C:\Users\Uksa007\Documents\Arduino\libraries\ESPAsyncTCP-master\src\ESPAsyncTCP.cpp: In constructor 'AsyncClient::AsyncClient(tcp_pcb*)':

C:\Users\Uksa007\Documents\Arduino\libraries\ESPAsyncTCP-master\src\ESPAsyncTCP.cpp:77:28: error: invalid conversion from 'long int ()(void, tcp_pcb, pbuf, long int)' to 'tcp_recv_fn {aka signed char ()(void, tcp_pcb, pbuf, signed char)}' [-fpermissive]

 tcp_recv(_pcb, &_s_recv);

                        ^

In file included from C:\Users\Uksa007\Documents\Arduino\libraries\ESPAsyncTCP-master\src\ESPAsyncTCP.cpp:27:0:

C:\Users\Uksa007\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0/tools/sdk/lwip/include/lwip/tcp.h:318:18: error: initializing argument 2 of 'void tcp_recv(tcp_pcb*, tcp_recv_fn)' [-fpermissive]

void tcp_recv (struct tcp_pcb *pcb, tcp_recv_fn recv) ICACHE_FLASH_ATTR;

              ^

C:\Users\Uksa007\Documents\Arduino\libraries\ESPAsyncTCP-master\src\ESPAsyncTCP.cpp:78:28: error: invalid conversion from 'long int ()(void, tcp_pcb, uint16_t) {aka long int ()(void, tcp_pcb, short unsigned int)}' to 'tcp_sent_fn {aka signed char ()(void, tcp_pcb*, short unsigned int)}' [-fpermissive]

 tcp_sent(_pcb, &_s_sent);

                        ^

many more errors removed

exit status 1 Error compiling for board WeMos D1 R2 & mini.

Uksa007 commented 7 years ago

To answer my own question, this issuse was the library, See here for how to fix it. https://github.com/me-no-dev/ESPAsyncTCP/issues/60#issuecomment-337480058

Why are they committing PR for 2.4_RC when they don't work with the current production release is beyond me !

PrashantPathakDB commented 7 years ago

I am facing this issue with NodeMCU and PlatformIO. I am using esp8266_stage. .piolibdeps\ESPAsyncTCP_ID305\src\ESPAsyncTCP.cpp:839:30: error: invalid conversion from 'int8_t ()(void, tcp_pcb, int8_t) { aka signed char ()(void, tcp_pcb, signed char)}' to 'tcp_accept_fn {aka long int ()(void, tcp_pcb, long int)}' [-fpermiss ive] tcp_accept(pcb, &s_accept); ^ In file included from .piolibdeps\ESPAsyncTCP_ID305\src\ESPAsyncTCP.cpp:27:0: C:\Users\verizon.platformio\packages\framework-arduinoespressif8266@src-31d658a59f41540201fc3726a1394910\tools\sdk\lwip\include/lwip/tcp.h:317:18: error: initializing argument 2 of 'void tcp_accept(tcp_pcb, tcp_accept_fn)' [-fpermissive] void tcp_accept (struct tcp_pcb *pcb, tcp_accept_fn accept) ICACHE_FLASH_ATTR; ^ *** [.pioenvs\nossl\lib\ESPAsyncTCP_ID305\ESPAsyncTCP.o] Error 1

Edzelf commented 7 years ago

Did you check https://github.com/me-no-dev/ESPAsyncTCP/issues/60 ?

PrashantPathakDB commented 7 years ago

I saw it but I don't understand what to do to resolve the issue? I am using platformio ide.

Edzelf commented 6 years ago

I used this to correct it.