I built casablanca for Android per the instructions here: How to build and setup for Android on Linux (2.3+).
I moved the compiled libraries to my Android project and linked the module that depends on casablanca per the instructions here: How to use the C++ REST SDK on Android (2.3+).
However, I get multiple linker errors.
For example, when trying to use
json::value::string( "some value" );
I get,
error: undefined reference to 'web::json::value::string(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >)'
And when trying to use
json::value version;
version[someValue] = something;
I get,
error: undefined reference to 'web::json::value::operator[](std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)'
I am compiling my Android project with clang.
I built on a Linux-64 VM and my Android project is on a Windows-64 machine. However, when trying to build a shared library of casablanca for Android on Linux, I also got multiple linker errors.
I suspect that there is some code being compiled with libstdc++ and some with libc++. From looking at the build scripts, I can see that clang is being used for both boost and casablanca but I also see include paths pointing to gcc headers. I'm also curious as to why I see on the linker output (on Windows) references to /sources/cxx-stl/gnu-libstdc++/4.8/include/ with my Linux VM path.
Any insights on how to get casablanca to link properly on Android will be appreciated.
Thanks.
(I posted this same question here.)
Actually ended up compiling the project code with libstdc++ (gnustl_shared).