Error compiling for board NodeMCU 1.0 (ESP-12E Module)
Posted: Sat Jun 06, 2020 2:36 pm
About a year ago I completed a few projects using Ken Taylor's wifiManager library. (https://github.com/kentaylor/WiFiManager/) and have based my projects on his ConfigureOnSwitch sketch. (https://github.com/kentaylor/WiFiManage ... igOnSwitch) I've got another use for it so I picked it up again and I'm getting this compiling error. I haven't changed/upgraded the Arduino IDE so not quite sure what's happening. I made sure I was using Taylors wifiManager.h It's complaning about "error: previous declaration of 'HTTPMethod HTTP_HEAD'". But more than that is above my experience. Here is the full error message. (In the back of my head I thought I remembered their was a configuration option in the IDE but this seems to point to something else. It's not just my new project that is moaning but all the stuff I did last year generates the same error when verifying the code. In my latest attempt I just tried compiling Taylor's example and get the same error. Thanks in advance for guidance on this.
Arduino: 1.8.9 (Windows 10), Board: "NodeMCU 1.0 (ESP-12E Module), 80 MHz, Flash, Legacy (new can return nullptr), All SSL ciphers (most compatible), 4MB (FS:2MB OTA:~1019KB), 2, v2 Lower Memory, Disabled, None, Only Sketch, 115200"
Build options changed, rebuilding all
In file included from C:\Users\Roberts\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.7.0/tools/sdk/libc/xtensa-lx106-elf/include/sys/stdio.h:6:0,
from C:\Users\Roberts\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.7.0/tools/sdk/libc/xtensa-lx106-elf/include/stdio.h:63,
from C:\Users\Roberts\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.7.0\cores\esp8266/Arduino.h:32,
from sketch\sketch_jun06b.ino.cpp:1:
C:\Users\Roberts\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.7.0/tools/sdk/libc/xtensa-lx106-elf/include/sys/pgmspace.h:25:130: error: 'const char HTTP_HEAD []' redeclared as different kind of symbol
#define PROGMEM __attribute__((section( "\".irom.text." __FILE__ "." __STRINGIZE(__LINE__) "." __STRINGIZE(__COUNTER__) "\"")))
^
C:\Users\Roberts\Documents\Arduino\libraries\WiFiManager/WiFiManager.h:32:24: note: in expansion of macro 'PROGMEM'
const char HTTP_HEAD[] PROGMEM = "<!DOCTYPE html><html lang=\"en\"><head><meta name=\"viewport\" content=\"width=device-width, initial-scale=1, user-scalable=no\"/><title>{v}</title>";
^
In file included from C:\Users\Roberts\Documents\Arduino\sketch_jun06b\sketch_jun06b.ino:11:0:
C:\Users\Roberts\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.7.0\libraries\ESP8266WebServer\src/ESP8266WebServer.h:34:39: error: previous declaration of 'HTTPMethod HTTP_HEAD'
enum HTTPMethod { HTTP_ANY, HTTP_GET, HTTP_HEAD, HTTP_POST, HTTP_PUT, HTTP_PATCH, HTTP_DELETE, HTTP_OPTIONS };
^
exit status 1
Error compiling for board NodeMCU 1.0 (ESP-12E Module).