ph1p / ikea-led-obegraensad

ESP32/Arduino hack for the ikea OBEGRÄNSAD led wall lamp
MIT License
610 stars 85 forks source link

Issue compiling for d1_mini_pro-ota; #include <string> missing in signs.h #106

Closed wallem89 closed 8 months ago

wallem89 commented 9 months ago

I have a compile issue with the current master version when I compile for target d1_mini_pro-ota:

In file included from src\signs.cpp:1:
include/signs.h:21:10: error: 'string' in namespace 'std' does not name a type
   21 |     std::string name;
      |          ^~~~~~
include/signs.h:6:1: note: 'std::string' is defined in header '<string>'; did you forget to '#include <string>'?
    5 | #include "constants.h"
  +++ |+#include <string>
    6 | // #include <string>

Last month the following code was added by @kohlsalem and this name part of the font struct requires this string type. I am not sure yet why this is not a problem for the other targets.

struct font {
    std::string name;
    int sizeX;
    int sizeY;
    int offset;
    std::vector<std::vector<int>> data;
};

This can simply be fixed by adding #include <string> on line 6 of signs. h. I will create a PR for this.

wallem89 commented 9 months ago

See PR #107

wallem89 commented 8 months ago

Thanks working again!