@alonewolfx2
I wonder one thing. Why you are using iostream class? For filesystem or anything else?
I've added it just to see what happens when you print to sdt::cout. In any case there's the same problem with <vector> include
@igrr
pparently the makefile you are using compiles .c files as C code, and you obviously want C++ if you use vector and iostream.
That's a good point which I didn't think of before. The thing is that i don't have g++ installed with the SDK for some reason. In /opt/Espressif/crosstool-NG/builds/xtensa-lx106-elf/bin I've got xtensa-lx106-elf-cc which points to xtensa-lx106-elf-gcc and xtensa-lx106-elf-gcc-4.8.2. No g++ and I can't find instructions on https://github.com/esp8266/esp8266-wiki/wiki/Toolchain on setting it up. How did you obtain a copy of xtensa-lx106-elf-g++?
@jcmvbkbc
Thank you for linking this makefile. I've tried tweaking which was quite easy but the results are quite the same. One thing which happened after changing the file extension to .cpp and trying to build with...
CXX := $(XTENSA_TOOLS_ROOT)/xtensa-lx106-elf-gcc
... which i have existing in the /opt/Espressif/crosstool-NG/builds/xtensa-lx106-elf/bin but it fails with a different error:
xtensa-lx106-elf-gcc: error: user/user_main.cpp: C++ compiler not installed on this system
Which is not exactly true since I've got g++ under /usr/bin/g++. After reading your and @igrr replies it seems obvious to me that I'm missing a modified g++ compiler for ESP8266 but I'm not sure what exactly I should do to get it?