The SDL forums have moved to discourse.libsdl.org.
This is just a read-only archive of the previous forums, to keep old links working.


SDL Forum Index
SDL
Simple Directmedia Layer Forums
SDL_TTF under Android
gabomdq


Joined: 28 Jul 2011
Posts: 495
Location: Argentina
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.
_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
SDL_TTF under Android
Tim Angus
Guest

On 13/10/2011 23:33, Gabriel Jacobo wrote:
Quote:
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.
_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
SDL_TTF under Android
gabomdq


Joined: 28 Jul 2011
Posts: 495
Location: Argentina
Quote:
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.
_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
SDL_TTF under Android
Ryan C. Gordon
Guest

Quote:
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.

_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
josebagar


Joined: 10 Dec 2010
Posts: 87
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 <algorithm>

and ndk-build fails with:

========================================
joseba@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 Smile
SDL_TTF under Android
dvd


Joined: 13 Oct 2011
Posts: 3
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


dvd

On Sat, Oct 15, 2011 at 4:14 PM, josebagar wrote:
Quote:
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@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


_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

SDL_TTF under Android
Ryan C. Gordon
Guest

On 10/15/2011 04:04 PM, David Van Duzer wrote:
Quote:
You can fix this by adding a file jni/Application.mk to your project
containing the lines:

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

--ryan.


_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
josebagar


Joined: 10 Dec 2010
Posts: 87
Thank you very much Smile