[Lazarus] CustomDrawn, Android: Crash on Device

Felipe Monteiro de Carvalho felipemonteiro.carvalho at gmail.com
Fri Dec 2 20:50:36 CET 2011


On Fri, Dec 2, 2011 at 8:00 PM, Mattias Gaertner
<nc-gaertnma at netcologne.de> wrote:
> The LCLBase must only contain widgetset independent IDFEFs.
> That means the {$IF defined(Android)} must be replaced with some FPC
> macros or the code must be moved to the widgetsets.

It cannot be moved to the widgetset because it does not simply add
something. It also removes something. It removes the usage of Iconv
and cwstring. If it is moved to the widgetsets, then we need to move
the code which is using iconv in LCLBase to the widgetsets too.

The root of the problem is that lclbase is depending on iconv, while
it should not IMHO.

> Is there is an FPC define to figure out if CWString can be used on arm?

No, and more: cwstring is never guaranteed to work. It depends on
iconv to do the real work, so it is a dependency just like gtk2 or qt,
which may or may not be installed or supported in a particular device.
It is not part of the Linux kernel. And iconv is not supported in
Android, it is not part of the NDK.

Android supports only the following libraries in API level 8:

1> libc.so
2> libdl.so (linker)
3> OpenGL ES 1
4> OpenGL ES 2
5> libjnigraphics.so
6> liblog.so
7> libm.so
8> libz.so
9> libthread_db.so
10> libstdc++.so

I checked level 14 and iconv is not there either.

LCL-CustomDrawn-Android uses libjnigraphics.so and liblog.so at the moment.

-- 
Felipe Monteiro de Carvalho




More information about the Lazarus mailing list