SDL_TTF under Android

Has anyone tried to use SDL_TTF under Android? I’ve tried several variations
(using the freetype and SDL_TTF sources from the sample android project, using
the latest freetype source cross compiled, etc), and the same fonts that seem
to work under Linux don’t work under Android, with a freetype error nr 2
(unknown file format), both instances compiled exactly the same AFAICT (only
removing BZIP2 support from the configuration).
I wonder if there’s something in the way RWOps work under Android that’s
throwing the library off, but before going in deeper I wanted to rule out
something obvious like if it’s working for everyone else but me.

Thanks for any help or comments.

Gabriel.

http://bugzilla.libsdl.org/show_bug.cgi?id=1301

I haven’t been able to reproduce any problems myself, but I’m happy to
look at it if someone can provide a test case.On 13/10/2011 23:33, Gabriel Jacobo wrote:

Has anyone tried to use SDL_TTF under Android? I’ve tried several variations
(using the freetype and SDL_TTF sources from the sample android project, using
the latest freetype source cross compiled, etc), and the same fonts that seem
to work under Linux don’t work under Android, with a freetype error nr 2
(unknown file format), both instances compiled exactly the same AFAICT (only
removing BZIP2 support from the configuration).
I wonder if there’s something in the way RWOps work under Android that’s
throwing the library off, but before going in deeper I wanted to rule out
something obvious like if it’s working for everyone else but me.

Thanks for any help or comments.

http://bugzilla.libsdl.org/show_bug.cgi?id=1301

I haven’t been able to reproduce any problems myself, but I’m happy to
look at it if someone can provide a test case.

I think I found a solution, I’ve posted a patch in that bug.

Gabriel.

I think I found a solution, I’ve posted a patch in that bug.

This is resolved in revision control now, I think (thanks, Gabriel and
Tim!),

–ryan.

First of all, thanks for fixing this and for the overall work in supporting SDL on Android.

I’ve been unable to compile the latest changeset myself as it does an
#include

and ndk-build fails with:========================================
joseba at joseba-AAO:~/cvs/bennugd/monolithic/projects/android$ ndk-build
Compile++ thumb : SDL <= SDL_android.cpp
/home/joseba/cvs/bennugd/monolithic/projects/android/jni/SDL/…/…/…/…/3rdparty/SDL-1.3/src//src/core/android/SDL_android.cpp:26:21: error: algorithm: No such file or directory
/home/joseba/cvs/bennugd/monolithic/projects/android/jni/SDL/…/…/…/…/3rdparty/SDL-1.3/src//src/core/android/SDL_android.cpp: In function ‘long int Android_JNI_FileSeek(SDL_RWops*, long int, int)’:
/home/joseba/cvs/bennugd/monolithic/projects/android/jni/SDL/…/…/…/…/3rdparty/SDL-1.3/src//src/core/android/SDL_android.cpp:525: error: ‘min’ is not a member of 'std’
make: *** [/home/joseba/cvs/bennugd/monolithic/projects/android/obj/local/armeabi/objs/SDL/src/core/android/SDL_android.o] Error 1

The Android Makefiles in SDL HG don’t seem to have changed, so I’m wondering if I’m missing something or maybe something should be fixed in hg…

Thanks in advance for your help :slight_smile:

You can fix this by adding a file jni/Application.mk to your project
containing the lines:

APP_PROJECT_PATH := $(call my-dir)/…
APP_STL := gnustl_static

dvdOn Sat, Oct 15, 2011 at 4:14 PM, josebagar <joseba.gar at gmail.com> wrote:

**
First of all, thanks for fixing this and for the overall work in supporting
SDL on Android.

I’ve been unable to compile the latest changeset myself as it does an
#include **

and ndk-build fails with:

========================================
joseba at joseba-AAO:~/cvs/bennugd/monolithic/projects/android$ ndk-build
Compile++ thumb : SDL <= SDL_android.cpp
/home/joseba/cvs/bennugd/monolithic/projects/android/jni/SDL/…/…/…/…/3rdparty/SDL-1.3/src//src/core/android/SDL_android.cpp:26:21:
error: algorithm: No such file or directory
/home/joseba/cvs/bennugd/monolithic/projects/android/jni/SDL/…/…/…/…/3rdparty/SDL-1.3/src//src/core/android/SDL_android.cpp:
In function ‘long int Android_JNI_FileSeek(SDL_RWops*, long int, int)’:
/home/joseba/cvs/bennugd/monolithic/projects/android/jni/SDL/…/…/…/…/3rdparty/SDL-1.3/src//src/core/android/SDL_android.cpp:525:
error: ‘min’ is not a member of 'std’
make: ***
[/home/joseba/cvs/bennugd/monolithic/projects/android/obj/local/armeabi/objs/SDL/src/core/android/SDL_android.o]
Error 1

The Android Makefiles in SDL HG don’t seem to have changed, so I’m
wondering if I’m missing something or maybe something should be fixed in
hg…

Thanks in advance for your help [image: Smile]


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

I just fixed this in revision control by removing the STL dependency.

–ryan.On 10/15/2011 04:04 PM, David Van Duzer wrote:

You can fix this by adding a file jni/Application.mk to your project
containing the lines:

Thank you very much :slight_smile: