This is the error I get when trying to compile the code:
Compiling .pioenvs/lcd-test/src/esphome/components/lcd_base/lcd_display.o
In file included from src/esphome/components/lcd_base/lcd_display.cpp:1:
src/esphome/components/lcd_base/lcd_display.h:24:54: error: 'vector' in namespace 'std' does not name a template type
void set_user_defined_char(uint8_t pos, const std::vector<uint8_t> &data) { this->user_defined_chars_[pos] = data; }
^~~~~~
src/esphome/components/lcd_base/lcd_display.h:24:49: note: 'std::vector' is defined in header '<vector>'; did you forget to '#include <vector>'?
src/esphome/components/lcd_base/lcd_display.h:11:1:
+#include <vector>
src/esphome/components/lcd_base/lcd_display.h:24:49:
void set_user_defined_char(uint8_t pos, const std::vector<uint8_t> &data) { this->user_defined_chars_[pos] = data; }
^~~
src/esphome/components/lcd_base/lcd_display.h:24:60: error: expected ',' or '...' before '<' token
void set_user_defined_char(uint8_t pos, const std::vector<uint8_t> &data) { this->user_defined_chars_[pos] = data; }
^
src/esphome/components/lcd_base/lcd_display.h:68:26: error: 'vector' is not a member of 'std'
std::map<uint8_t, std::vector<uint8_t> > user_defined_chars_;
^~~~~~
src/esphome/components/lcd_base/lcd_display.h:68:26: note: 'std::vector' is defined in header '<vector>'; did you forget to '#include <vector>'?
src/esphome/components/lcd_base/lcd_display.h:68:26: error: 'vector' is not a member of 'std'
src/esphome/components/lcd_base/lcd_display.h:68:26: note: 'std::vector' is defined in header '<vector>'; did you forget to '#include <vector>'?
src/esphome/components/lcd_base/lcd_display.h:68:40: error: template argument 2 is invalid
std::map<uint8_t, std::vector<uint8_t> > user_defined_chars_;
^
src/esphome/components/lcd_base/lcd_display.h:68:40: error: template argument 4 is invalid
src/esphome/components/lcd_base/lcd_display.h:68:42: error: expected unqualified-id before '>' token
std::map<uint8_t, std::vector<uint8_t> > user_defined_chars_;
^
src/esphome/components/lcd_base/lcd_display.h: In member function 'void esphome::lcd_base::LCDDisplay::set_user_defined_char(uint8_t, int)':
src/esphome/components/lcd_base/lcd_displa`Preformatted text`y.h:24:85: error: 'class esphome::lcd_base::LCDDisplay' has no member named 'user_defined_chars_'; did you mean 'set_user_defined_char'?
void set_user_defined_char(uint8_t pos, const std::vector<uint8_t> &data) { this->user_defined_chars_[pos] = data; }
^~~~~~~~~~~~~~~~~~~
set_user_defined_char
src/esphome/components/lcd_base/lcd_display.h:24:112: error: 'data' was not declared in this scope
void set_user_defined_char(uint8_t pos, const std::vector<uint8_t> &data) { this->user_defined_chars_[pos] = data; }
^~~~
src/esphome/components/lcd_base/lcd_display.h:24:112: note: suggested alternative: 'atan'
void set_user_defined_char(uint8_t pos, const std::vector<uint8_t> &data) { this->user_defined_chars_[pos] = data; }
^~~~
atan
src/esphome/components/lcd_base/lcd_display.cpp: In member function 'virtual void esphome::lcd_base::LCDDisplay::setup()':
src/esphome/components/lcd_base/lcd_display.cpp:69:40: error: 'class esphome::lcd_base::LCDDisplay' has no member named 'user_defined_chars_'; did you mean 'set_user_defined_char'?
for (auto &user_defined_char : this->user_defined_chars_) {
^~~~~~~~~~~~~~~~~~~
set_user_defined_char
*** [.pioenvs/lcd-test/src/esphome/components/lcd_base/lcd_display.o] Error 1
========================== [FAILED] Took 3.27 seconds ==========================
There’s obviously a problem with the lcd_display.h file. These files are generated automatically by ESPHome, so any changes I make are reverted when I compile again.
I’ve tried searching for this problem, however I’m only finding things on Arduino and C++.
Compiling /data/esp-s2/.pioenvs/esp-s2/src/esphome/components/lcd_gpio/gpio_lcd_display.o
In file included from src/esphome/components/lcd_gpio/gpio_lcd_display.h:4,
from src/esphome/components/lcd_gpio/gpio_lcd_display.cpp:1:
src/esphome/components/lcd_base/lcd_display.h:24:54: error: 'vector' in namespace 'std' does not name a template type
void set_user_defined_char(uint8_t pos, const std::vector<uint8_t> &data) { this->user_defined_chars_[pos] = data; }
^~~~~~
src/esphome/components/lcd_base/lcd_display.h:24:49: note: 'std::vector' is defined in header '<vector>'; did you forget to '#include <vector>'?
src/esphome/components/lcd_base/lcd_display.h:11:1:
+#include <vector>
src/esphome/components/lcd_base/lcd_display.h:24:49:
void set_user_defined_char(uint8_t pos, const std::vector<uint8_t> &data) { this->user_defined_chars_[pos] = data; }
^~~
src/esphome/components/lcd_base/lcd_display.h:24:60: error: expected ',' or '...' before '<' token
void set_user_defined_char(uint8_t pos, const std::vector<uint8_t> &data) { this->user_defined_chars_[pos] = data; }
^
src/esphome/components/lcd_base/lcd_display.h:68:26: error: 'vector' is not a member of 'std'
std::map<uint8_t, std::vector<uint8_t> > user_defined_chars_;
^~~~~~
src/esphome/components/lcd_base/lcd_display.h:68:26: note: 'std::vector' is defined in header '<vector>'; did you forget to '#include <vector>'?
src/esphome/components/lcd_base/lcd_display.h:68:26: error: 'vector' is not a member of 'std'
src/esphome/components/lcd_base/lcd_display.h:68:26: note: 'std::vector' is defined in header '<vector>'; did you forget to '#include <vector>'?
src/esphome/components/lcd_base/lcd_display.h:68:40: error: template argument 2 is invalid
std::map<uint8_t, std::vector<uint8_t> > user_defined_chars_;
^
src/esphome/components/lcd_base/lcd_display.h:68:40: error: template argument 4 is invalid
src/esphome/components/lcd_base/lcd_display.h:68:42: error: expected unqualified-id before '>' token
std::map<uint8_t, std::vector<uint8_t> > user_defined_chars_;
^
src/esphome/components/lcd_base/lcd_display.h: In member function 'void esphome::lcd_base::LCDDisplay::set_user_defined_char(uint8_t, int)':
src/esphome/components/lcd_base/lcd_display.h:24:85: error: 'class esphome::lcd_base::LCDDisplay' has no member named 'user_defined_chars_'; did you mean 'set_user_defined_char'?
void set_user_defined_char(uint8_t pos, const std::vector<uint8_t> &data) { this->user_defined_chars_[pos] = data; }
^~~~~~~~~~~~~~~~~~~
set_user_defined_char
src/esphome/components/lcd_base/lcd_display.h:24:112: error: 'data' was not declared in this scope
void set_user_defined_char(uint8_t pos, const std::vector<uint8_t> &data) { this->user_defined_chars_[pos] = data; }
^~~~
src/esphome/components/lcd_base/lcd_display.h:24:112: note: suggested alternative: 'atan'
void set_user_defined_char(uint8_t pos, const std::vector<uint8_t> &data) { this->user_defined_chars_[pos] = data; }
^~~~
atan
In file included from src/esphome/components/lcd_base/lcd_display.cpp:1:
src/esphome/components/lcd_base/lcd_display.h:24:54: error: 'vector' in namespace 'std' does not name a template type
void set_user_defined_char(uint8_t pos, const std::vector<uint8_t> &data) { this->user_defined_chars_[pos] = data; }
^~~~~~
src/esphome/components/lcd_base/lcd_display.h:24:49: note: 'std::vector' is defined in header '<vector>'; did you forget to '#include <vector>'?
src/esphome/components/lcd_base/lcd_display.h:11:1:
+#include <vector>
src/esphome/components/lcd_base/lcd_display.h:24:49:
void set_user_defined_char(uint8_t pos, const std::vector<uint8_t> &data) { this->user_defined_chars_[pos] = data; }
^~~
src/esphome/components/lcd_base/lcd_display.h:24:60: error: expected ',' or '...' before '<' token
void set_user_defined_char(uint8_t pos, const std::vector<uint8_t> &data) { this->user_defined_chars_[pos] = data; }
^
src/esphome/components/lcd_base/lcd_display.h:68:26: error: 'vector' is not a member of 'std'
std::map<uint8_t, std::vector<uint8_t> > user_defined_chars_;
^~~~~~
src/esphome/components/lcd_base/lcd_display.h:68:26: note: 'std::vector' is defined in header '<vector>'; did you forget to '#include <vector>'?
src/esphome/components/lcd_base/lcd_display.h:68:26: error: 'vector' is not a member of 'std'
src/esphome/components/lcd_base/lcd_display.h:68:26: note: 'std::vector' is defined in header '<vector>'; did you forget to '#include <vector>'?
src/esphome/components/lcd_base/lcd_display.h:68:40: error: template argument 2 is invalid
std::map<uint8_t, std::vector<uint8_t> > user_defined_chars_;
^
src/esphome/components/lcd_base/lcd_display.h:68:40: error: template argument 4 is invalid
src/esphome/components/lcd_base/lcd_display.h:68:42: error: expected unqualified-id before '>' token
std::map<uint8_t, std::vector<uint8_t> > user_defined_chars_;
^
src/esphome/components/lcd_base/lcd_display.h: In member function 'void esphome::lcd_base::LCDDisplay::set_user_defined_char(uint8_t, int)':
src/esphome/components/lcd_base/lcd_display.h:24:85: error: 'class esphome::lcd_base::LCDDisplay' has no member named 'user_defined_chars_'; did you mean 'set_user_defined_char'?
void set_user_defined_char(uint8_t pos, const std::vector<uint8_t> &data) { this->user_defined_chars_[pos] = data; }
^~~~~~~~~~~~~~~~~~~
set_user_defined_char
src/esphome/components/lcd_base/lcd_display.h:24:112: error: 'data' was not declared in this scope
void set_user_defined_char(uint8_t pos, const std::vector<uint8_t> &data) { this->user_defined_chars_[pos] = data; }
^~~~
src/esphome/components/lcd_base/lcd_display.h:24:112: note: suggested alternative: 'atan'
void set_user_defined_char(uint8_t pos, const std::vector<uint8_t> &data) { this->user_defined_chars_[pos] = data; }
^~~~
atan
*** [/data/esp-s2/.pioenvs/esp-s2/src/esphome/components/lcd_gpio/gpio_lcd_display.o] Error 1
src/esphome/components/lcd_base/lcd_display.cpp: In member function 'virtual void esphome::lcd_base::LCDDisplay::setup()':
src/esphome/components/lcd_base/lcd_display.cpp:69:40: error: 'class esphome::lcd_base::LCDDisplay' has no member named 'user_defined_chars_'; did you mean 'set_user_defined_char'?
for (auto &user_defined_char : this->user_defined_chars_) {
^~~~~~~~~~~~~~~~~~~
set_user_defined_char
*** [/data/esp-s2/.pioenvs/esp-s2/src/esphome/components/lcd_base/lcd_display.o] Error 1
========================== [FAILED] Took 4.21 seconds ==========================