gysmo38 / mitsubishi2MQTT

Mitsubishi to MQTT with ESP8266 module
GNU Lesser General Public License v2.1
390 stars 139 forks source link

hostnamePrefix causes a section type conflict with __c #92

Closed reibuehl closed 2 years ago

reibuehl commented 4 years ago

I try to compile the code with the Arduino IDE but compilation fails with error message "hostnamePrefix causes a section type conflict with __c" in config.h. Is there a way to fix this?

This is the full error output:

` Arduino: 1.8.12 (Windows 10), Board: "Generic ESP8266 Module, 80 MHz, ck, 26 MHz, 40MHz, QIO, 512K (no SPIFFS), 2, v2 Lower Memory, Disabled, None, Only Sketch, 115200"

In file included from C:\Users\reibuehl\Mitsubishi2MQTT\src\mitsubishi2mqtt\mitsubishi2mqtt.ino:39:0:

config.h:42:21: error: hostnamePrefix causes a section type conflict with __c

const PROGMEM char* hostnamePrefix = "HVAC_";

                 ^

In file included from C:\Users\reibuehl\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.1\cores\esp8266/Arduino.h:258:0,

             from sketch\mitsubishi2mqtt.ino.cpp:1:

C:\Users\reibuehl\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.1\cores\esp8266/pgmspace.h:16:51: note: '__c' was declared here

define PSTR(s) (extension({static const char c[] PROGMEM = (s); &c[0];}))

                                               ^

C:\Users\reibuehl\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.1\cores\esp8266/WString.h:38:76: note: in definition of macro 'FPSTR'

define FPSTR(pstr_pointer) (reinterpret_cast<const __FlashStringHelper *>(pstr_pointer))

                                                                        ^

C:\Users\reibuehl\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.1\cores\esp8266/WString.h:39:34: note: in expansion of macro 'PSTR'

define F(string_literal) (FPSTR(PSTR(string_literal)))

                              ^

C:\Users\reibuehl\Mitsubishi2MQTT\src\mitsubishi2mqtt\mitsubishi2mqtt.ino:1709:22: note: in expansion of macro 'F'

 server.send(302, F("text/html"), redirectPage);

                  ^

exit status 1 hostnamePrefix causes a section type conflict with __c `