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 - Teyas

Pages: [1]
1
General / Re: Android NDK - SFML-Example Build Error
« on: May 08, 2017, 10:24:33 pm »
Hello,

So after re-doing the process for NDK-r11c, I'm now getting this error

C:\MobileDev\SFML\examples\android>ndk-build
[armeabi-v7a] "Install        ": "libsfml-activity.so => libs/armeabi-v7a/libsfml-activity.so"
process_begin: CreateProcess(NULL, C:/MobileDev/AndroidDev/android-ndk-r11c/build//../toolchains/arm-linux-androideabi-4.9/prebuilt/windows-x86_64/bin/arm-linux-androideabi-strip --strip-unneeded ./libs/armeabi-v7a/libsfml-activity.so, ...) failed.
make (e=2): The system cannot find the file specified.
make: *** [libs/armeabi-v7a/libsfml-activity.so] Error 2
make: *** Deleting file `libs/armeabi-v7a/libsfml-activity.so'

I haven't been able to look into much this evening so it may be something very simple.

EDIT: I changed the folder in NDK/source/sfml from lib to libs and now I get another error!

C:\MobileDev\SFML\examples\android>ndk-build
[armeabi] "Compile++ thumb": "sfml-example <= main.cpp"
process_begin: CreateProcess(NULL, C:/MobileDev/AndroidDev/android-ndk-r11c/build//../toolchains/arm-linux-androideabi-4.9/prebuilt/windows-x86_64/bin/arm-linux-androideabi-g++ -MMD -MP -MF ./obj/local/armeabi/objs/sfml-example/main.o.d -fpic -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -march=armv5te -mtune=xscale -msoft-float -fno-exceptions -fno-rtti -mthumb -Os -g -DNDEBUG -fomit-frame-pointer -fno-strict-aliasing -finline-limit=64 -IC:/MobileDev/AndroidDev/android-ndk-r11c/build//../sources/cxx-stl/stlport/stlport -IC:/MobileDev/AndroidDev/android-ndk-r11c/build//../sources/cxx-stl//gabi++/include -Ijni -DANDROID -Wa,--noexecstack -Wformat -Werror=format-security -frtti -isystem C:/MobileDev/AndroidDev/android-ndk-r11c/build//../platforms/android-9/arch-arm/usr/include -c jni/main.cpp -o ./obj/local/armeabi/objs/sfml-example/main.o, ...) failed.
make (e=2): The system cannot find the file specified.
make: *** [obj/local/armeabi/objs/sfml-example/main.o] Error 2

2
General / Re: Android NDK - SFML-Example Build Error
« on: May 08, 2017, 06:53:56 pm »
Hey buddy, thank you very much for the response - sorry I've been stuck at work all day.

No I haven't tried that, I wasn't aware it was an issue with the NDK; so I've learnt something. I'll start installing it now and let you know how it goes.

Thank you!

3
General / Android NDK - SFML-Example Build Error
« on: May 07, 2017, 10:56:43 pm »
Hello there,

I've seen multiple threads but none have solved my issue so here I am.

I've installed all of the necessary Android development tools and I've built and installed the most recent SFML using CMake. SFML and its headers are in the AndroidNDK source folder after the install as they should be.

I then change directory to the example and perform

android update project --target 1 --path . --name SFML-Example which updates perfectly.

I then do "ndk-build" which outputs:

[armeabi-v7a] Prebuilt       : libsfml-activity.so <= <NDK>/sources/sfml/lib/armeabi-v7a/
[armeabi-v7a] Install        : libsfml-activity.so => libs/armeabi-v7a/libsfml-activity.so
[armeabi-v7a] Compile++ thumb: sfml-example <= main.cpp
[armeabi-v7a] Prebuilt       : libsfml-graphics.so <= <NDK>/sources/sfml/lib/armeabi-v7a/
[armeabi-v7a] Prebuilt       : libsfml-audio.so <= <NDK>/sources/sfml/lib/armeabi-v7a/
[armeabi-v7a] Prebuilt       : libsfml-network.so <= <NDK>/sources/sfml/lib/armeabi-v7a/
[armeabi-v7a] Prebuilt       : libc++_shared.so <= <NDK>/sources/cxx-stl/llvm-libc++/libs/armeabi-v7a/
[armeabi-v7a] Prebuilt       : libsfml-window.so <= <NDK>/sources/sfml/lib/armeabi-v7a/
[armeabi-v7a] Prebuilt       : libsfml-system.so <= <NDK>/sources/sfml/lib/armeabi-v7a/
[armeabi-v7a] SharedLibrary  : libsfml-example.so
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&)'
jni/main.cpp:90: error: undefined reference to 'sf::Music::openFromFile(std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> > const&)'
C:/MobileDev/AndroidDev/android-ndk-r12b/build//../sources/sfml/lib/armeabi-v7a/libsfml-main.a(MainAndroid.o):MainAndroid.cpp:function ANativeActivity_onCreate: error: undefined reference to 'std::basic_ios<char, std::char_traits<char> >::rdbuf(std::basic_streambuf<char, std::char_traits<char> >*)'
C:/MobileDev/AndroidDev/android-ndk-r12b/build//../sources/sfml/lib/armeabi-v7a/libsfml-main.a(MainAndroid.o):MainAndroid.cpp:function onDestroy(ANativeActivity*): error: undefined reference to 'std::locale::~locale()'
C:/MobileDev/AndroidDev/android-ndk-r12b/build//../sources/sfml/lib/armeabi-v7a/libsfml-main.a(MainAndroid.o):MainAndroid.cpp:function onDestroy(ANativeActivity*): error: undefined reference to 'std::string::_Rep::_M_destroy(std::allocator<char> const&)'
C:/MobileDev/AndroidDev/android-ndk-r12b/build//../sources/sfml/lib/armeabi-v7a/libsfml-main.a(MainAndroid.o):MainAndroid.cpp:function onDestroy(ANativeActivity*): error: undefined reference to 'std::string::_Rep::_S_empty_rep_storage'
C:/MobileDev/AndroidDev/android-ndk-r12b/build//../sources/sfml/lib/armeabi-v7a/libsfml-main.a(MainAndroid.o):MainAndroid.cpp:function onDestroy(ANativeActivity*): error: undefined reference to 'vtable for std::basic_streambuf<char, std::char_traits<char> >'
C:/MobileDev/AndroidDev/android-ndk-r12b/build//../toolchains/arm-linux-androideabi-4.9/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld.exe: the vtable symbol may be undefined because the class is missing its key function (see go/missingkeymethod)
collect2.exe: error: ld returned 1 exit status
make: *** [obj/local/armeabi-v7a/libsfml-example.so] Error 1

However, if I change the application make file for the example to be "APP_STL := stlport_shared" it then becomes:

[armeabi-v7a] Install        : libsfml-activity.so => libs/armeabi-v7a/libsfml-activity.so
[armeabi-v7a] Compile++ thumb: sfml-example <= main.cpp
[armeabi-v7a] Prebuilt       : libstlport_shared.so <= <NDK>/sources/cxx-stl/stlport/libs/armeabi-v7a/
[armeabi-v7a] SharedLibrary  : libsfml-example.so
C:/MobileDev/AndroidDev/android-ndk-r12b/build//../sources/sfml/lib/armeabi-v7a/libsfml-main.a(MainAndroid.o):MainAndroid.cpp:function ANativeActivity_onCreate: error: undefined reference to 'std::basic_ios<char, std::char_traits<char> >::rdbuf(std::basic_streambuf<char, std::char_traits<char> >*)'
C:/MobileDev/AndroidDev/android-ndk-r12b/build//../sources/sfml/lib/armeabi-v7a/libsfml-main.a(MainAndroid.o):MainAndroid.cpp:function onDestroy(ANativeActivity*): error: undefined reference to 'std::string::_Rep::_M_destroy(std::allocator<char> const&)'
C:/MobileDev/AndroidDev/android-ndk-r12b/build//../sources/sfml/lib/armeabi-v7a/libsfml-main.a(MainAndroid.o):MainAndroid.cpp:function onDestroy(ANativeActivity*): error: undefined reference to 'std::string::_Rep::_S_empty_rep_storage'
collect2.exe: error: ld returned 1 exit status
make: *** [obj/local/armeabi-v7a/libsfml-example.so] Error 1

What exactly am I doing wrong for these 3 errors to persist? I believe all my environment variables are setup correctly but I have an inkling that may be where the error lies.

Pages: [1]
anything