Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: [Solution] #include <ostream> No such file or directory | Android Build SFML  (Read 3972 times)

0 Members and 1 Guest are viewing this topic.

OmaManfred

  • Newbie
  • *
  • Posts: 20
    • View Profile
    • Email
Hey, just wanted to give you a possible "bug fix", because I saw some other people having the same issue in the past. If "make"ing your android makefiles returns an error "#include <ostream> No such file or directory", try switiching your NDK to version 12b. With that one it worked fine (not with 13b though, the currently newest one)

Best wishes,

rumgot

  • Newbie
  • *
  • Posts: 2
    • View Profile
    • Email
Build SFML-library not so:
cmake -DANDROID_ABI=armeabi-v7a -DCMAKE_TOOLCHAIN_FILE=../../cmake/toolchains/android.toolchain.cmake ../..

But like this:
cmake -DANDROID_ABI=armeabi-v7a -DCMAKE_TOOLCHAIN_FILE=../../cmake/toolchains/android.toolchain.cmake -DANDROID_STL=stlport_static ../..

Or this:
cmake -DANDROID_ABI=armeabi-v7a -DCMAKE_TOOLCHAIN_FILE=../../cmake/toolchains/android.toolchain.cmake -DANDROID_STL=stlport_shared ../..

Allowed values for the parameter ANDROID_STL can be seen in the file
<SFML_DIRECTORY>/cmake/toolchains/android.toolchain.cmake

These steps I checked on SFML-2.4.1.

rumgot

  • Newbie
  • *
  • Posts: 2
    • View Profile
    • Email
But later, when I executed a command
ndk-build
I got an error:
undefined reference to 'sf::String::String(char const*, std::__ndk1::locale const&)'
So while I will use android-ndk-r12b.

4r4r

  • Newbie
  • *
  • Posts: 1
    • View Profile
in your ..\jni\Android.mk
replace
include $(BUILD_SHARED_LIBRARY)
with
include $(BUILD_STATIC_LIBRARY)

 

anything