I'm trying to use std::map<Key, Value> in Sming 2.1.0 application.
I've got following building error:
undefined reference to `std::_Rb_tree_decrement(std::_Rb_tree_node_base*)'
According to this viewtopic.php?p=40593 one should add -lstdc++ (and potentially -lsupc++) to the list of libraries to link with.
But in Makefile-project.mk in Sming there is -nostdlib flag!
LDFLAGS = -nostdlib ...
If I change it to -lstdc++ -lsupc++ I've got those errors instead:
c:/espressif/xtensa-lx106-elf/bin/../lib/gcc/xtensa-lx106-elf/5.1.0/../../../../xtensa-lx106-elf/bin/ld.exe: cannot find crt1-sim.o: No such file or directory
c:/espressif/xtensa-lx106-elf/bin/../lib/gcc/xtensa-lx106-elf/5.1.0/../../../../xtensa-lx106-elf/bin/ld.exe: cannot find _vectors.o: No such file or directory
And to solve this here https://www.reddit.com/r/esp8266/commen ... rd_errors/ recommended following:
Try using the -nostdlib link option.
Excellent!
After all, I haven't find final answer: "If there any way to use std::map in Sming?"
Thank you in advance for help.