I think anyone who has compiled for android has come across the ‘std::to_string is not a member of std’ error. There appears to be 2 common solutions on the forum
- reimplement std::to_string yourself and include it in all necessary files
A long time ago I tried reimplemented std::to_string myself, only to find
gnustl_static is missing all sorts of other basic functions like std::round and c++11 string converters like std::stoi, std::stod, etc. As I recall gnustl_static had no support for std::future.
c++_static fixed all these problems and I was happy.
Now I would like to change my workflow from using cocos2d-x and its source code, to using the Cocos App with Framework and prebuilt libs. Using
c++_static with the prebuilt framework does not work. I created a github issue for this and the response was ‘currently
c++_static is not supported’.
So my question is, why are we supporting
gnustl_static and not
c++_static? Is there is a reason we can’t switch to
Requiring cocos2dx users to reimplement std functions is obviously a bad solution. As @ricardo says “Game Designer/Developers should be in charge of designing the game, and coding the game, but things outside the game should be provided by cocos2d”