Crosscompile C++ program

I am new in Turris OS/OpenWRT and I need to crosscompile c++ program. The problem is, I am still getting this error:

error: 'to_string' is not a member of 'std' "duplicate raw value " + std::to_string(it->first));

Now I know, it’s problem, that there isn’t used c++11 during compilation, but I don’t know how to enable that.

Before, I tried to crosscompile the same program on LEDE for Raspberry Pi and everything worked fine. When I looked into staging_dir, for Raspberry Pi is gcc version 5.5.0, for Omnia it is version 4.8, which is probably the problem, but I am not sure how to solve that.

Thank you for your advice, Jakub.

C++11 should be completely implemented in gcc 4.8, see:

But because it’s standard library there might be difference in that. Most probably on RPi you have libstdc++ which is gnu implementation. But on Turris there is uclibc++. So try to check this difference.

I would add -std=c++11 to the command-line. The default language version has changed in between the gcc versions IIRC.