Trying to follow this tutorial: https://github.com/SFML/SFML/wiki/Tutorial:-Building-SFML-for-Android
I've installed Android Studio with Android SDK (the latest stable), then from the SDK Manager, installed the NDK (version 13).
I've accordingly set my PATH to include the android sdk/tools, sdk/platform-tools and the ndk it had downloaded and set ANDROID_NDK accordingly too.
Then executing the cmake command on the wiki gives me this error:
In file included from /home/amish/Others/Source/SFML/src/SFML/System/Err.cpp:28:0:
/home/amish/Others/Source/SFML/include/SFML/System/Err.hpp:32:19: fatal error: ostream: No such file or directory
#include <ostream>
^
compilation terminated.
I've tried this both with SFML 2.3.2 and SFML github snapshot.
My system: Ubuntu 16.04
I even found a forum post with someone having similar problem (http://en.sfml-dev.org/forums/index.php?topic=16033.0) but OP's case was solved when they switched to NDK 10 from 9 but I'm using 13, a much newer version.
Now I'm getting linker errors when trying to compile the example.
It is this same issue: https://github.com/SFML/SFML/wiki/Tutorial:-Building-SFML-for-Android#stl-clash
But the resolution provided is to use: "-DANDROID_STL=c++_shared" but if I do that, SFML doesn't compile at all.
jni/main.cpp:79: error: undefined reference to 'sf::String::String(char const*, std::__ndk1::locale const&)'
jni/main.cpp:82: error: undefined reference to 'sf::Texture::loadFromFile(std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> > const&, sf::Rect<int> const&)'
...