• Skip to main content
  • Skip to primary sidebar

RNTLab.com

The Ultimate Shortcut to Learn Electronics and Programming with Open Source Hardware and Software

  • Courses
  • Forum
    • Forum
    • Ask Question
  • Shop
  • Account
  • Blog
  • Login

AsyncTCP.h:46:8: note: forward declaration of 'struct ip_addr' struct ip_addr;

Q&A Forum › Category: ESP32 › AsyncTCP.h:46:8: note: forward declaration of 'struct ip_addr' struct ip_addr;
0 Vote Up Vote Down
Satit Phermsawang asked 6 years ago

Build an ESP32 Web Server using Files from Filesystem (SPIFFS)
after compile the error show  as below:
Please advice.
Thank you in advance.
Error——-
 
home/magnums/Arduino/libraries/AsyncTCP-master/src/AsyncTCP.cpp:259:32: error: field ‘call’ has incomplete type ‘tcpip_api_call_data’
struct tcpip_api_call_data call;
^
/home/magnums/Arduino/libraries/AsyncTCP-master/src/AsyncTCP.cpp:259:12: note: forward declaration of ‘struct tcpip_api_call_data’
struct tcpip_api_call_data call;
^
/home/magnums/Arduino/libraries/AsyncTCP-master/src/AsyncTCP.cpp: In function ‘esp_err_t _tcp_output(tcp_pcb*)’:
/home/magnums/Arduino/libraries/AsyncTCP-master/src/AsyncTCP.cpp:295:70: error: invalid conversion from ‘err_t (*)(tcpip_api_call_data*) {aka signed char (*)(tcpip_api_call_data*)}’ to ‘tcpip_api_call_fn {aka signed char (*)(tcpip_api_call*)}’ [-fpermissive]
tcpip_api_call(_tcp_output_api, (struct tcpip_api_call_data*)&msg);
^
/home/magnums/Arduino/libraries/AsyncTCP-master/src/AsyncTCP.cpp:295:70: error: cannot convert ‘tcpip_api_call_data*’ to ‘tcpip_api_call*’ for argument ‘2’ to ‘err_t tcpip_api_call(tcpip_api_call_fn, tcpip_api_call*)’
/home/magnums/Arduino/libraries/AsyncTCP-master/src/AsyncTCP.cpp:259:12: note: class type ‘tcpip_api_call_data’ is incomplete
struct tcpip_api_call_data call;
^
/home/magnums/Arduino/libraries/AsyncTCP-master/src/AsyncTCP.cpp: In function ‘esp_err_t _tcp_write(tcp_pcb*, const char*, size_t, uint8_t)’:
/home/magnums/Arduino/libraries/AsyncTCP-master/src/AsyncTCP.cpp:311:69: error: invalid conversion from ‘err_t (*)(tcpip_api_call_data*) {aka signed char (*)(tcpip_api_call_data*)}’ to ‘tcpip_api_call_fn {aka signed char (*)(tcpip_api_call*)}’ [-fpermissive]
tcpip_api_call(_tcp_write_api, (struct tcpip_api_call_data*)&msg);
^
/home/magnums/Arduino/libraries/AsyncTCP-master/src/AsyncTCP.cpp:311:69: error: cannot convert ‘tcpip_api_call_data*’ to ‘tcpip_api_call*’ for argument ‘2’ to ‘err_t tcpip_api_call(tcpip_api_call_fn, tcpip_api_call*)’
/home/magnums/Arduino/libraries/AsyncTCP-master/src/AsyncTCP.cpp:259:12: note: class type ‘tcpip_api_call_data’ is incomplete
struct tcpip_api_call_data call;
^
/home/magnums/Arduino/libraries/AsyncTCP-master/src/AsyncTCP.cpp: In function ‘esp_err_t _tcp_recved(tcp_pcb*, size_t)’:
/home/magnums/Arduino/libraries/AsyncTCP-master/src/AsyncTCP.cpp:326:70: error: invalid conversion from ‘err_t (*)(tcpip_api_call_data*) {aka signed char (*)(tcpip_api_call_data*)}’ to ‘tcpip_api_call_fn {aka signed char (*)(tcpip_api_call*)}’ [-fpermissive]
tcpip_api_call(_tcp_recved_api, (struct tcpip_api_call_data*)&msg);
^
/home/magnums/Arduino/libraries/AsyncTCP-master/src/AsyncTCP.cpp:326:70: error: cannot convert ‘tcpip_api_call_data*’ to ‘tcpip_api_call*’ for argument ‘2’ to ‘err_t tcpip_api_call(tcpip_api_call_fn, tcpip_api_call*)’
/home/magnums/Arduino/libraries/AsyncTCP-master/src/AsyncTCP.cpp:259:12: note: class type ‘tcpip_api_call_data’ is incomplete
struct tcpip_api_call_data call;
^
/home/magnums/Arduino/libraries/AsyncTCP-master/src/AsyncTCP.cpp: In function ‘esp_err_t _tcp_connect(tcp_pcb*, ip_addr_t*, uint16_t, tcp_connected_fn)’:
/home/magnums/Arduino/libraries/AsyncTCP-master/src/AsyncTCP.cpp:342:71: error: invalid conversion from ‘err_t (*)(tcpip_api_call_data*) {aka signed char (*)(tcpip_api_call_data*)}’ to ‘tcpip_api_call_fn {aka signed char (*)(tcpip_api_call*)}’ [-fpermissive]
tcpip_api_call(_tcp_connect_api, (struct tcpip_api_call_data*)&msg);
^
/home/magnums/Arduino/libraries/AsyncTCP-master/src/AsyncTCP.cpp:342:71: error: cannot convert ‘tcpip_api_call_data*’ to ‘tcpip_api_call*’ for argument ‘2’ to ‘err_t tcpip_api_call(tcpip_api_call_fn, tcpip_api_call*)’
/home/magnums/Arduino/libraries/AsyncTCP-master/src/AsyncTCP.cpp:259:12: note: class type ‘tcpip_api_call_data’ is incomplete
struct tcpip_api_call_data call;
^
/home/magnums/Arduino/libraries/AsyncTCP-master/src/AsyncTCP.cpp: In function ‘esp_err_t _tcp_close(tcp_pcb*)’:
/home/magnums/Arduino/libraries/AsyncTCP-master/src/AsyncTCP.cpp:356:69: error: invalid conversion from ‘err_t (*)(tcpip_api_call_data*) {aka signed char (*)(tcpip_api_call_data*)}’ to ‘tcpip_api_call_fn {aka signed char (*)(tcpip_api_call*)}’ [-fpermissive]
tcpip_api_call(_tcp_close_api, (struct tcpip_api_call_data*)&msg);
^
/home/magnums/Arduino/libraries/AsyncTCP-master/src/AsyncTCP.cpp:356:69: error: cannot convert ‘tcpip_api_call_data*’ to ‘tcpip_api_call*’ for argument ‘2’ to ‘err_t tcpip_api_call(tcpip_api_call_fn, tcpip_api_call*)’
/home/magnums/Arduino/libraries/AsyncTCP-master/src/AsyncTCP.cpp:259:12: note: class type ‘tcpip_api_call_data’ is incomplete
struct tcpip_api_call_data call;
^
/home/magnums/Arduino/libraries/AsyncTCP-master/src/AsyncTCP.cpp: In function ‘esp_err_t _tcp_abort(tcp_pcb*)’:
/home/magnums/Arduino/libraries/AsyncTCP-master/src/AsyncTCP.cpp:371:69: error: invalid conversion from ‘err_t (*)(tcpip_api_call_data*) {aka signed char (*)(tcpip_api_call_data*)}’ to ‘tcpip_api_call_fn {aka signed char (*)(tcpip_api_call*)}’ [-fpermissive]
tcpip_api_call(_tcp_abort_api, (struct tcpip_api_call_data*)&msg);
^
/home/magnums/Arduino/libraries/AsyncTCP-master/src/AsyncTCP.cpp:371:69: error: cannot convert ‘tcpip_api_call_data*’ to ‘tcpip_api_call*’ for argument ‘2’ to ‘err_t tcpip_api_call(tcpip_api_call_fn, tcpip_api_call*)’
/home/magnums/Arduino/libraries/AsyncTCP-master/src/AsyncTCP.cpp:259:12: note: class type ‘tcpip_api_call_data’ is incomplete
struct tcpip_api_call_data call;
^
/home/magnums/Arduino/libraries/AsyncTCP-master/src/AsyncTCP.cpp: In function ‘esp_err_t _tcp_bind(tcp_pcb*, ip_addr_t*, uint16_t)’:
/home/magnums/Arduino/libraries/AsyncTCP-master/src/AsyncTCP.cpp:386:68: error: invalid conversion from ‘err_t (*)(tcpip_api_call_data*) {aka signed char (*)(tcpip_api_call_data*)}’ to ‘tcpip_api_call_fn {aka signed char (*)(tcpip_api_call*)}’ [-fpermissive]
tcpip_api_call(_tcp_bind_api, (struct tcpip_api_call_data*)&msg);
^
/home/magnums/Arduino/libraries/AsyncTCP-master/src/AsyncTCP.cpp:386:68: error: cannot convert ‘tcpip_api_call_data*’ to ‘tcpip_api_call*’ for argument ‘2’ to ‘err_t tcpip_api_call(tcpip_api_call_fn, tcpip_api_call*)’
/home/magnums/Arduino/libraries/AsyncTCP-master/src/AsyncTCP.cpp:259:12: note: class type ‘tcpip_api_call_data’ is incomplete
struct tcpip_api_call_data call;
^
/home/magnums/Arduino/libraries/AsyncTCP-master/src/AsyncTCP.cpp: In function ‘tcp_pcb* _tcp_listen_with_backlog(tcp_pcb*, uint8_t)’:
/home/magnums/Arduino/libraries/AsyncTCP-master/src/AsyncTCP.cpp:401:70: error: invalid conversion from ‘err_t (*)(tcpip_api_call_data*) {aka signed char (*)(tcpip_api_call_data*)}’ to ‘tcpip_api_call_fn {aka signed char (*)(tcpip_api_call*)}’ [-fpermissive]
tcpip_api_call(_tcp_listen_api, (struct tcpip_api_call_data*)&msg);
^
/home/magnums/Arduino/libraries/AsyncTCP-master/src/AsyncTCP.cpp:401:70: error: cannot convert ‘tcpip_api_call_data*’ to ‘tcpip_api_call*’ for argument ‘2’ to ‘err_t tcpip_api_call(tcpip_api_call_fn, tcpip_api_call*)’
/home/magnums/Arduino/libraries/AsyncTCP-master/src/AsyncTCP.cpp:259:12: note: class type ‘tcpip_api_call_data’ is incomplete
struct tcpip_api_call_data call;
^
/home/magnums/Arduino/libraries/AsyncTCP-master/src/AsyncTCP.cpp: In member function ‘void AsyncClient::_dns_found(ip_addr*)’:
/home/magnums/Arduino/libraries/AsyncTCP-master/src/AsyncTCP.cpp:643:33: error: invalid use of incomplete type ‘struct ip_addr’
connect(IPAddress(ipaddr->u_addr.ip4.addr), _connect_port);
^
In file included from /home/magnums/Arduino/libraries/AsyncTCP-master/src/AsyncTCP.cpp:24:0:
/home/magnums/Arduino/libraries/AsyncTCP-master/src/AsyncTCP.h:46:8: note: forward declaration of ‘struct ip_addr’
struct ip_addr;
^
Multiple libraries were found for “ESPAsyncWebServer.h”
Used: /home/magnums/Arduino/libraries/ESPAsyncWebServer
Not used: /home/magnums/arduino-1.8.8/libraries/ESPAsyncWebServer
Multiple libraries were found for “AsyncTCP.h”
Used: /home/magnums/Arduino/libraries/AsyncTCP-master
Not used: /home/magnums/arduino-1.8.8/libraries/AsyncTCP-master
Multiple libraries were found for “WiFi.h”
Used: /home/magnums/.arduino15/packages/esp32/hardware/esp32/1.0.0/libraries/WiFi
Not used: /home/magnums/arduino-1.8.8/libraries/WiFi
exit status 1
Error compiling for board ESP32 Dev Module.

1 Answers
0 Vote Up Vote Down
Rui Santos Staff answered 6 years ago

Hello Salit, It looks like you’re using an outdated library and that’s why is not compiling. Can you ensure that you update all the libraries and the ESP32 board add-on?

  • Arduino IDE 1.8.8
  • Tools > Board > Boards Manager: ESP32 board add-on: core version 1.0.1
  • Sketch > Include Library > Manage libraries: AsyncTCP library version 1.0.3

Using the latest libraries will fix that error. More information here: https://github.com/espressif/arduino-esp32/issues/1887

Primary Sidebar

Login to Ask or Answer Questions

This Forum is private and it’s only available for members enrolled in our Courses.

Login »

Latest Course Updates

  • [eBook Updated] Learn Raspberry Pi Pico/Pico W with MicroPython eBook – Version 1.2 May 26, 2025
  • [New Edition] Build ESP32-CAM Projects eBook – 2nd Edition April 16, 2025

You must be logged in to view this content.

Contact Support - Refunds - Privacy - Terms - MakerAdvisor.com - Member Login

Copyright © 2013-2025 · RandomNerdTutorials.com · All Rights Reserved

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.