Chat freely about anything...

User avatar
By wakewatcher
#87432 About a year ago I completed a few projects using Ken Taylor's wifiManager library. ( and have based my projects on his ConfigureOnSwitch sketch. ( ... 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'



exit status 1
Error compiling for board NodeMCU 1.0 (ESP-12E Module).
User avatar
By wakewatcher
#87441 I don't know anything about any esp core 2.7.0 upgrade or change. Is that something that automagically happens? As mentioned above I haven't intentionally upgraded anything because as you hint I've been burned before. I did find a updated version of WifiManger by Khoi Hoang which so far works. (Haven't got to adding parameters yet.) It's a fork of Ken Taylor's (which no longer works for me) which is a fork of Tzapu’s WifiManager. It's all a bit of a mystery. Anyway solved in a round about way for new projects.
User avatar
By schufti
#87447 I don't know how either (it is your PC) but you're definitely on the Arduino esp8266 core in version 2.7.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'

hint: goto board manager, deinstall esp8266 package, newly install e.g. 2.4.2 or anything you like before 2.7.0 or wait for a response from the devs - AFAIK it is a known problem and allready fixed in the git-version.
Last edited by schufti on Sun Jun 07, 2020 3:26 pm, edited 1 time in total.