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

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - imnaero

Pages: [1]
1
General / Re: Problem with building Android Project (ndk-build)
« on: February 08, 2016, 06:34:17 pm »
Thank you, using MSYS worked.

2
General / Problem with building Android Project (ndk-build)
« on: February 07, 2016, 11:53:53 pm »
Hello,
I've been having issues building Android all weekend and am currently stuck on running ndk-build.
I have been following this guide: https://github.com/SFML/SFML/wiki/Tutorial%3A-Building-SFML-for-Android

Here are the steps I have completed so far:
1. Downloaded Git, CMake, Android SDK & NDK, Apache Ant.
2. Set enviorenment variables for all of the above.
3. Cloned SFML source from Git
4. Made a build directory within SFML folder, and within that made an "armeabi-v7a" folder
5. Called this to create a project:

 cmake -DANDROID_NDK=<My android NDK location> -DANDROID_USE_STLPORT=TRUE -DANDROID_ABI=armeabi-v7a -DCMAKE_TOOLCHAIN_FILE=../../cmake/toolchains/android.toolchain.cmake ../..

Note: This returns a warning that CMAKE might not set STL properly.

6. Opened ALL-BUILD project in VS2012 and buildt ALL-BUILD (9/10 succeeded, 1 skipped)
7. Selected INSTALL within VS2012 and buildt INSTALL (1 succeeded, 9 skipped)
8. Within SFML/examples/android i have called

android update project --target "android-19" --path .

9. Edited my Applications.mk so that APP_STL := stlport_shared (This is what i think is setting STLPORT manually?)

10. Run ndk-build upon which i receive this error when building:

[armeabi-v7a] Compile++ thumb: sfml-example <= main.cpp
jni/main.cpp:1:27: fatal error: SFML/System.hpp: No such file or directory
#include <SFML/System.hpp>^

Does anyone know what I've missed / did incorrectly?
I've previously had this work with APP_STL := gnustl_shared but when i compiled my .apk later
it just opened and closed, which is described by Sonkun (forum user) as what will happen if you dont use stlport so it is to be expected.

3
General discussions / Re: Android and iOS ports available for testing
« on: February 07, 2016, 02:54:07 am »
Hello!

I've been trying all day to compile SFML for android and i have been following this guide:
https://github.com/SFML/SFML/wiki/Tutorial:-Building-SFML-for-Android

So far I've made it to actually building the android example by calling 'ndk-build'.
However when I do, i get a load of errors. It seems to start out well and then fails when it reaches a shared
library in main.cpp. I can't make any sense of what it's looking for that isn't there and when i should have created that object.

Here are my errors, can any of you brilliant people infer from this what i might have done wrong?

EDIT: I have circumvented this issue by changing this line in my Application.mk:
APP_STL := gnustl_shared (instead of c++shared)

C:\Androidstuff\SFML\examples\android>ndk-build -B
[armeabi-v7a] Prebuilt       : libsfml-activity.so <= <NDK>/sources/sfml/lib/arm
eabi-v7a/
[armeabi-v7a] Install        : libsfml-activity.so => libs/armeabi-v7a/libsfml-a
ctivity.so
[armeabi-v7a] Compile++ thumb: sfml-example <= main.cpp
[armeabi-v7a] Prebuilt       : libsfml-graphics.so <= <NDK>/sources/sfml/lib/arm
eabi-v7a/
[armeabi-v7a] Prebuilt       : libsfml-audio.so <= <NDK>/sources/sfml/lib/armeab
i-v7a/
[armeabi-v7a] Prebuilt       : libsfml-network.so <= <NDK>/sources/sfml/lib/arme
abi-v7a/
[armeabi-v7a] Prebuilt       : libc++_shared.so <= <NDK>/sources/cxx-stl/llvm-li
bc++/libs/armeabi-v7a/thumb/
[armeabi-v7a] Prebuilt       : libsfml-window.so <= <NDK>/sources/sfml/lib/armea
bi-v7a/
[armeabi-v7a] Prebuilt       : libsfml-system.so <= <NDK>/sources/sfml/lib/armea
bi-v7a/
[armeabi-v7a] SharedLibrary  : libsfml-example.so
jni/main.cpp:10: error: undefined reference to 'sf::String::String(char const*,
std::__1::locale const&)'
jni/main.cpp:13: error: undefined reference to 'sf::Texture::loadFromFile(std::_
_1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >
const&, sf::Rect<int> const&)'
jni/main.cpp:21: error: undefined reference to 'sf::Music::openFromFile(std::__1
::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > co
nst&)'
C:/Androidstuff/android-ndk-r10e/sources/sfml/lib/armeabi-v7a/libsfml-main.a(Mai
nAndroid.o):MainAndroid.cpp:function ANativeActivity_onCreate: error: undefined
reference to 'std::basic_ios<char, std::char_traits<char> >::rdbuf(std::basic_st
reambuf<char, std::char_traits<char> >*)'
C:/Androidstuff/android-ndk-r10e/sources/sfml/lib/armeabi-v7a/libsfml-main.a(Mai
nAndroid.o):MainAndroid.cpp:function onDestroy(ANativeActivity*): error: undefin
ed reference to 'std::locale::~locale()'
C:/Androidstuff/android-ndk-r10e/sources/sfml/lib/armeabi-v7a/libsfml-main.a(Mai
nAndroid.o):MainAndroid.cpp:function onDestroy(ANativeActivity*): error: undefin
ed reference to 'std::string::_Rep::_M_destroy(std::allocator<char> const&)'
C:/Androidstuff/android-ndk-r10e/sources/sfml/lib/armeabi-v7a/libsfml-main.a(Mai
nAndroid.o):MainAndroid.cpp:function onDestroy(ANativeActivity*): error: undefin
ed reference to 'std::string::_Rep::_S_empty_rep_storage'
C:/Androidstuff/android-ndk-r10e/sources/sfml/lib/armeabi-v7a/libsfml-main.a(Mai
nAndroid.o):MainAndroid.cpp:function onDestroy(ANativeActivity*): error: undefin
ed reference to 'vtable for std::basic_streambuf<char, std::char_traits<char> >'

C:/Androidstuff/android-ndk-r10e/toolchains/arm-linux-androideabi-4.8/prebuilt/w
indows/bin/../lib/gcc/arm-linux-androideabi/4.8/../../../../arm-linux-androideab
i/bin/ld.exe: the vtable symbol may be undefined because the class is missing it
s key function
collect2.exe: error: ld returned 1 exit status
make.exe: *** [obj/local/armeabi-v7a/libsfml-example.so] Error 1

C:\Androidstuff\SFML\examples\android>

Pages: [1]
anything