FreeType on Android lazarus / 43-Android ---------------------------------------------------------------------- jmpessoa · 2013-09-02 04:38 Hi there! I got this messages/logs "C:\laz4android\fpc\2.7.1\bin\i386-win32\arm-linux-androideabi-ld.exe: cannot find -lfreetype"  "error: Error while linking" when I tried use these units: FTFont, freetype, freetypeh on my android module (.so). Anyone know how to cross-compile the FreeType library stuff for Android using the TrueTom package laz4android1.1-41139? Thank you! ---------------------------------------------------------------------- Leledumbo · 2013-09-03 15:06 QuoteAnyone know how to cross-compile the FreeType library stuff for Android using the TrueTom package laz4android1.1-41139? Build the freetype library for your android and put the .so along with your app .so or drop dependency to freetype library by using native Pascal freetype implementation. ---------------------------------------------------------------------- jmpessoa · 2013-09-03 18:23 Hi Leledumbo, 1. The main question:  How to cross-compile the FreeType library stuff for Android using the TrueTom package laz4android1.1-41139 ( I need this for compatibility) At the moment I do not know to do this ...  2.Alternative question: Is LazFreeType LCL dependent (or not) ? Thank you very much! ---------------------------------------------------------------------- Leledumbo · 2013-09-04 14:57 Quote1. The main question:  How to cross-compile the FreeType library stuff for Android using the TrueTom package laz4android1.1-41139 ( I need this for compatibility)Got Android NDK? Got FreeType source code? Build the source code using NDK toolchain (the source code should have instruction how to do it). FreeType is written in C, so you'll need a C compiler (and probably a bunch of other libraries it depends on) to build. Quote2.Alternative question: Is LazFreeType LCL dependent (or not) ?Seems not (see attached screenshot, from PasViz output) ---------------------------------------------------------------------- jmpessoa · 2013-09-04 18:05 Thank you! I am will try LazFreeType! ---------------------------------------------------------------------- jmpessoa · 2013-09-08 18:18 Hi there! from https://github.com/cdave1/freetype2-android (and small changes to produce a SHARED_LIBRARY) I got  cross-compile the FreeType library stuff for Android and bind with free pascal stuff (FTFont, freetype, freetypeh)! Yes, we can run fcl-image + freetype on Android! thanks to all! ---------------------------------------------------------------------- jmpessoa · 2013-09-10 03:34 Hi there! Follows a picture (attached) showing a small example of my attempt to bring Free Pascal  fci-image + freetype to play on Android.... Greetings! ---------------------------------------------------------------------- jmpessoa · 2013-12-29 15:54 @Sergionn follow my "primitive "investigations in using freetype2 lib on android... I - How to build a freetype ".so" for Android... on Windows.   I.1- You have to install e configure MinGW (32 bits)  to cross compile "C" stuff to Android...   I.2- I got from https://github.com/cdave1/freetype2-android the freetype "C" stuff...  and build a Eclipse project  with small changes in "Android.mk"  and  "Application.mk" to produce a SHARED_LIBRARY...   :: My Eclipse Project to make "FreeType" is here:      http://jmpessoa.opendrive.com/files?Ml8zNzY0NTA2Ml8zcWZTRA    ::After (un)rar:  -> open the project with Eclipse and "right click" -> Properties  -> Edit: Builder -> Freetype_builder .... to you paths....  -> Run!  -> Open \libs\armeabi and \libs\armeabi-v7a       Yes!  "libfreetype.so"  are there! II. Using the new "libfreetype.so"     - Just create a project and put the "libfreetype.so" in         \libs\armeabi   (or: \libs\armeabi-v7a) !      :: My Eclipse "Demo "Project is here:         http://jmpessoa.opendrive.com/files?Ml8zNzY0Njk5Ml9BbnQ4Yw  Good luck! ---------------------------------------------------------------------- Sergionn · 2013-12-29 18:05 Jmpessoa, Thanks a lot!!! ---------------------------------------------------------------------- jmpessoa · 2013-12-30 17:34 Hi, @Sergionn, I forgot to tell you.  The "libfreetype.so" that you got from  my "primitive" investigations was built for platform "android-8". Please, change the Android.mk"  and  "Application.mk" to produce a SHARED_LIBRARY for other platform, ex. "android-14"... Thank you. ---------------------------------------------------------------------- lenz · 2013-12-30 20:16 This is great work! I'll get my hands dirty with FreeType now. As a small note, what I understood is that you should use the most recent Android NDK version for building and for run-time, it will remain compatible with lower OS versions. I'm compiling everything using NDK-R9B (and will soon try R9C) without any issues and it works on devices from KitKat down to Gingerbread. Another note, I wouldn't suggest targeting Android-8 at all because Froyo doesn't support native activities and is very scarce anyway. In my case, I had to switch ROMs on my Galaxy Pro to Gingerbread (before it had Froyo) just to be able to run anything on it. ---------------------------------------------------------------------- jmpessoa · 2013-12-30 20:33 @lenz Yes,  This example was built for "android-8" platform,   but this is outdated now.... Please, change "Application.mk"  file. Thank you.