martin-ger / lwip_nat_arduino

lwip library with NAT feature for Arduino environment
59 stars 21 forks source link

Errors with Arduino Interface #11

Open JayantBenjamin opened 5 years ago

JayantBenjamin commented 5 years ago

I was planning to add my own captive portal for a project but I have not been able to compile this in the Arduino interface Can you tell me what I'm doing wrong ? Here are the errors Arduino: 1.8.5 (Mac OS X), Board: "NodeMCU 1.0 (ESP-12E Module), 80 MHz, 115200, 4M (3M SPIFFS)"

In file included from /Users/pratibhabenjamin/Documents/Arduino/lwip_nat_arduino-master/CaptiveHotspot/CaptiveHotspot.ino:5:0: /Users/pratibhabenjamin/Library/Arduino15/packages/esp8266/hardware/esp8266/2.2.0/tools/sdk/lwip/include/lwip/app/dhcpserver.h:27:17: error: field 'start_ip' has incomplete type struct ip_addr start_ip;

             ^

/Users/pratibhabenjamin/Library/Arduino15/packages/esp8266/hardware/esp8266/2.2.0/tools/sdk/lwip/include/lwip/app/dhcpserver.h:28:17: error: field 'end_ip' has incomplete type struct ip_addr end_ip;

             ^

/Users/pratibhabenjamin/Library/Arduino15/packages/esp8266/hardware/esp8266/2.2.0/tools/sdk/lwip/include/lwip/app/dhcpserver.h:39:17: error: field 'ip' has incomplete type struct ip_addr ip;

             ^

/Users/pratibhabenjamin/Documents/Arduino/lwip_nat_arduino-master/CaptiveHotspot/CaptiveHotspot.ino: In function 'void setup()': CaptiveHotspot:247: error: could not convert 'myIP' from 'IPAddress' to 'ip_addr_t {aka ip_addr}' patch_netif(myIP, my_input_ap, &orig_input_ap, my_output_ap, &orig_output_ap); ^ CaptiveHotspot:250: error: 'IP_NAPT_MAX' was not declared in this scope ip_napt_init(IP_NAPT_MAX, IP_PORTMAP_MAX); ^ CaptiveHotspot:250: error: 'IP_PORTMAP_MAX' was not declared in this scope ip_napt_init(IP_NAPT_MAX, IP_PORTMAP_MAX); ^ CaptiveHotspot:250: error: 'ip_napt_init' was not declared in this scope ip_napt_init(IP_NAPT_MAX, IP_PORTMAP_MAX); ^ CaptiveHotspot:253: error: 'ip_napt_enable_no' was not declared in this scope ip_napt_enable_no(1, 1); ^ CaptiveHotspot:256: error: 'dhcps_set_DNS' was not declared in this scope dhcps_set_DNS(WiFi.dnsIP()); ^ exit status 1 could not convert 'myIP' from 'IPAddress' to 'ip_addr_t {aka ip_addr}' /Users/pratibhabenjamin/Documents/Arduino/lwip_nat_arduino-master/WiFiNatRouter.ino

JayantBenjamin commented 5 years ago

@martin-ger