Hi, i9 get whne crosscompiling c++ software (ZGloom):
hud.cpp:373:15: error: ‘to_string’ is not a member of ‘std’
pos += std::to_string(player.x.GetInt());
and with std::atoi, std::stoi too.
How can I "enable"/add std:: methods/functions?
1)Looking on internet I can change "to_string" to use a selfmade method/function.
2)Adding -std=c++11 doesn't solve anything.
EDIT1: solved part of the problem by compling x`c++ with clib2 (-mcrt=clib2), maybe using with newlib need some other args to add to compiler.
Now I "only" get this errors:
ppc-amigaos-g++ -gstabs -fpermissive -mcrt=clib2 -I/usr/local/amiga/ppc-amigaos/SDK/local/common/include -std=c++11 -c -o config.o config.cpp
config.cpp: In function ‘void Config::Init()’:
config.cpp:320:29: error: ‘stoi’ is not a member of ‘std’
configkeys = std::stoi(val);
EDIT2: solved stoi, by finding a replacement function (http://www.cplusplus.com/articles/D9j2Nwbp/), but linking pass fails, I assume 'cos the SDL2/.. objects are newlib and can't mix clib2 and newlib :-/
Do I need to add some "special" options/args to add to makefile to compile with c++ and newlib?