Hello, I have this very weird linker error when compiling my sketch for the ESP8266.
#include <list>
void setup ()
{
std::list<int> mylist;
mylist.push_back(0);
}
void loop() {}
It is weird that I get the following error because it should actually be correct. I tried it on two different computers and also tried resetting everything Arduino IDE related without success.
sketch\sketch_apr28a.ino.cpp.o:(.text.setup+0x0): undefined reference to `std::__detail::_List_node_base::_M_hook(std::__detail::_List_node_base*)'
sketch\sketch_apr28a.ino.cpp.o: In function `construct<std::_List_node<int>, int>':
[...]\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2\xtensa-lx106-elf\include\c++\4.8.2\ext/new_allocator.h:120: undefined reference to `std::__detail::_List_node_base::_M_hook(std::__detail::_List_node_base*)'
collect2.exe: error: ld returned 1 exit status
exit status 1
Does anybody know what's going on here? Are lists not supported on the ESP8266 or is it a conflict with other Arduino-ESP8266 related libraries?
Thanks for reading!