Error: __c causes a section type conflict with __c

Thank you for taking a look!
I am having conflict between two or three codes.

I am combining wifimanager “FSparameter” example from github (wifi manager)

  • aRest cloud Pro example from github (internet dashboard)
  • an email code that works with

I have used the WiFiManager code with email code with much success. I have also used the WiFiManage code with the aRest dashboard code with much success.

When I try and combine the WiFiManager with both email and aRest, I get this error:

__c causes a section type conflict with __c

With these notes:

In file included from C:\Users****\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\cores\esp8266/Arduino.h:243:0,

from sketch\test_test.ino.cpp:1:

C:\Users***\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\cores\esp8266/pgmspace.h:21:51: error: __c causes a section type conflict with __c

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


C:\Users*****\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\cores\esp8266/WString.h:38:76: note: in definition of macro ‘FPSTR’

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


C:\Users*****\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\cores\esp8266/WString.h:39:34: note: in expansion of macro ‘PSTR’

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


C:\Users****\Documents\Arduino\test_test\test_test.ino:129:18: note: in expansion of macro ‘F’



C:\Users******\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\cores\esp8266/pgmspace.h:21:51: note: ‘__c’ was declared here

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


C:\Users****\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\cores\esp8266/WString.h:38:76: note: in definition of macro ‘FPSTR’

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


C:\Users****\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\cores\esp8266/WString.h:39:34: note: in expansion of macro ‘PSTR’

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


C:\Users*****\Documents\Arduino\libraries\aREST/aREST.h:300:15: note: in expansion of macro ‘F’

addToBuffer(F(“HTTP/1.1 200 OK\r\nAccess-Control-Allow-Origin: *\r\nAccess-Control-Allow-Methods: POST, GET, PUT, OPTIONS\r\nContent-Type: application/json\r\nConnection: close\r\n\r\n”));


exit status 1
Error compiling.

#include <FS.h>                   //this needs to be first, or it all crashes and burns...

#include <ESP8266WiFi.h>          //

//needed for library
#include <DNSServer.h>
#include <ESP8266WebServer.h>
#include <WiFiManager.h>          //

#include <ArduinoJson.h>          //
#include <PubSubClient.h>
#include <aREST.h>

// Clients
WiFiClient espClient;
PubSubClient client(espClient);

// Create aREST instance
aREST rest = aREST(client);

// aREST Pro key (that you can get at
char * key = "your_arest_key";
//define your default values here, if there are different values in config.json, they are overwritten.
char mqtt_server[40];
char mqtt_port[6] = "8080";
char blynk_token[34] = "YOUR_BLYNK_TOKEN";

char server[] = "";

WiFiClient client2;

//flag for saving data
bool shouldSaveConfig = false;

//callback notifying us of the need to save config
void saveConfigCallback () {
  Serial.println("Should save config");
  shouldSaveConfig = true;

void callback(char* topic, byte* payload, unsigned int length);

byte eRcv()
  byte respCode;
  byte thisByte;
  int loopCount = 0;

  while (!client2.available()) {
    // if nothing received for 10 seconds, timeout
    if (loopCount > 10000) {
      return 0;

  respCode = client2.peek();
  while (client2.available())
    thisByte =;

  if (respCode >= '4')
    //  efail();
    return 0;
  return 1;

  byte sendEmail()
  byte thisByte = 0;
  byte respCode;

  if (client2.connect(server, 2525) == 1) {
  } else {
    Serial.println(F("connection failed"));
    return 0;
  if (!eRcv()) return 0;

  Serial.println(F("Sending EHLO"));
  if (!eRcv()) return 0;
  Serial.println(F("Sending auth login"));
  client2.println("auth login");
  if (!eRcv()) return 0;
  Serial.println(F("Sending User"));
  // Change to your base64, ASCII encoded user
  client2.println("base64CODE"); //<---------User
  if (!eRcv()) return 0;
  Serial.println(F("Sending Password"));
  // change to your base64, ASCII encoded password
  if (!eRcv()) return 0;
  Serial.println(F("Sending From"));
  // change to your email address (sender)
  if (!eRcv()) return 0;
  // change to recipient address
  Serial.println(F("Sending To"));
  client2.println(String("RCPT "));
  if (!eRcv()) return 0;
  Serial.println(F("Sending DATA"));
  if (!eRcv()) return 0;
  Serial.println(F("Sending email"));
  // change to recipient address
  // change to your address
  client2.println(F("Subject: stuff\r\n"));
  client2.println(F("Some stuff here\n"));


  if (!eRcv()) return 0;
  Serial.println(F("Sending QUIT"));
  if (!eRcv()) return 0;
  return 1;

void setup() {
  // put your setup code here, to run once:

  //clean FS, for testing

  //read configuration from FS json
  Serial.println("mounting FS...");

  if (SPIFFS.begin()) {
    Serial.println("mounted file system");
    if (SPIFFS.exists("/config.json")) {
      //file exists, reading and loading
      Serial.println("reading config file");
      File configFile ="/config.json", "r");
      if (configFile) {
        Serial.println("opened config file");
        size_t size = configFile.size();
        // Allocate a buffer to store contents of the file.
        std::unique_ptr<char[]> buf(new char[size]);

        configFile.readBytes(buf.get(), size);
        DynamicJsonBuffer jsonBuffer;
        JsonObject& json = jsonBuffer.parseObject(buf.get());
        if (json.success()) {
          Serial.println("\nparsed json");

          strcpy(mqtt_server, json["mqtt_server"]);
          strcpy(mqtt_port, json["mqtt_port"]);
          strcpy(blynk_token, json["blynk_token"]);

        } else {
          Serial.println("failed to load json config");
  } else {
    Serial.println("failed to mount FS");
  //end read

  // The extra parameters to be configured (can be either global or just in the setup)
  // After connecting, parameter.getValue() will get you the configured value
  // id/name placeholder/prompt default length
  WiFiManagerParameter custom_mqtt_server("server", "mqtt server", mqtt_server, 40);
  WiFiManagerParameter custom_mqtt_port("port", "mqtt port", mqtt_port, 5);
  WiFiManagerParameter custom_blynk_token("blynk", "blynk token", blynk_token, 32);

  //Local intialization. Once its business is done, there is no need to keep it around
  WiFiManager wifiManager;

  //set config save notify callback

  //set static ip
  wifiManager.setSTAStaticIPConfig(IPAddress(10,0,1,99), IPAddress(10,0,1,1), IPAddress(255,255,255,0));
  //add all your parameters here

  //reset settings - for testing

  //set minimu quality of signal so it ignores AP's under that quality
  //defaults to 8%
  //sets timeout until configuration portal gets turned off
  //useful to make it all retry or go to sleep
  //in seconds

  //fetches ssid and pass and tries to connect
  //if it does not connect it starts an access point with the specified name
  //here  "AutoConnectAP"
  //and goes into a blocking loop awaiting configuration
  if (!wifiManager.autoConnect("Example", "example1")) {
    Serial.println("failed to connect and hit timeout");
    //reset and try again, or maybe put it to deep sleep

  //if you get here you have connected to the WiFi
  Serial.println("connected...yeey :)");

  //read updated parameters
  strcpy(mqtt_server, custom_mqtt_server.getValue());
  strcpy(mqtt_port, custom_mqtt_port.getValue());
  strcpy(blynk_token, custom_blynk_token.getValue());

  //save the custom parameters to FS
  if (shouldSaveConfig) {
    Serial.println("saving config");
    DynamicJsonBuffer jsonBuffer;
    JsonObject& json = jsonBuffer.createObject();
    json["mqtt_server"] = mqtt_server;
    json["mqtt_port"] = mqtt_port;
    json["blynk_token"] = blynk_token;

    File configFile ="/config.json", "w");
    if (!configFile) {
      Serial.println("failed to open config file for writing");

    //end save

  Serial.println("local ip");
 // Set aREST key
  rest.setKey(key, client);

  // Set callback
     char* out_topic = rest.get_topic();

     byte ret = sendEmail();

void loop() {
  // put your main code here, to run repeatedly:


void callback(char* topic, byte* payload, unsigned int length) {

  rest.handle_callback(client, topic, payload, length);


When adding necesary components of the cloud_pro example from aRest, I encounter these problems as I get to this line:

aREST rest = aREST(client);

Did you every found the solution to this problem? I have the same issue with aREST.