Trying to build Cereal for Android. Am I right assuming that the dependency on __cxa_demangle is critical?
We have built cereal on Android. I have copied Spandan to try and help you. (hope that's OK Spandan)
cereal.hpp:641:101: error: 'to_string' is not a member of 'std'
I have dedicated a lot of time to this issue, so any help would be much appreciated.
Robert.
W/o context, --std=c++11 is likely the solution.ᐧ
Unfortunately, Android's standard library (particularly in older versions) is missing a large number of stanard library functions. It can be worked around by putting the following above your "#include <cereal.hpp>" in your consuming app:
#ifdef __ANDROID // note, this define might be different in your system, if you are doing android ONLY you can exclude the ifdef.
#include android.h
#endif
Then, create android.h with the following:
#include <iostream>
namespace std
{
template<typename T>
std::string to_string(T item)
{
ostringstream sstr;
sstr << item;
return sstr.str();
}
}