esp8266 / Arduino

ESP8266 core for Arduino
GNU Lesser General Public License v2.1
16.01k stars 13.33k forks source link

Name conflict with SD.h and FS.h #3710

Closed awigen closed 6 years ago

awigen commented 6 years ago

Including both FS.h and SD.h produces the following compile error:

framework-arduinoespressif8266/libraries/SD/src/SD.h:27:7: error: redefinition of 'class fs::File' class File : public Stream { Indexing .pioenvs/esp12e/lib/libAsyncMqttClient_ID346.a ^ In file included from .piolibdeps/Homie/src/Homie/Datatypes/../Config.hpp:6:0, from .piolibdeps/Homie/src/Homie/Datatypes/Interface.hpp:7, from .piolibdeps/Homie/src/Homie.hpp:6, from .piolibdeps/Homie/src/Homie.h:4, from src/main.cpp:6: framework-arduinoespressif8266/cores/esp8266/FS.h:48:7: error: previous definition of 'class fs::File' class File : public Stream ^

----------------------------- Remove above -----------------------------

Basic Infos

Sketch


#include <Arduino.h>
#include <FD.h>
#include <SD.h>

void setup() {

}

void loop() {

}
devyte commented 6 years ago

@awigen the Arduino usage is really meant for only one file system, which here means either SPIFFS or SD. Still, it's possible to use both, see #2281 . Closing.