[fpc-pascal] Working Free Pascal android JNI example
Felipe Monteiro de Carvalho
felipemonteiro.carvalho at gmail.com
Wed Aug 10 11:09:26 CEST 2011
Hello, I am ressuscitating this ancient thread because I'd like to
continue the talk about it =)
My main doubt here is if androidprt0.as is really required, which
would mean that I can only produce android libraries if I make changes
to the compiler.
Benjamin, couldn't one just declare the missing simbols in code? This
would simplify things a bit.
Original message since most probably won't have it:
On Sun, Jun 27, 2010 at 9:50 AM, Benjamin Jan Alexander Rosseaux
<benjamin at rosseaux.com> wrote:
> I've done a working Free Pascal android JNI example (with working .apk for
> current ARM-based Android device of the second device generation (because
> with VFPv3, so Motorola Droid/Milestone, HTC Desire, Nexus One, Samsung
> Galaxy S, and so on) inside)
>
> http://vserver.rosseaux.net/stuff/FPCAndroidJNINativeTest.zip
>
> It contains androidprt0.as as replacement for the empty arm/linux dllprt0.as
> of the FreePascal RTL from the SVN, because otherwise the Android Dalvik VM
> refuses to load the .so library because of missed/absent
> global/import/export symbols (_haltproc_eabi, __strptr,
> __operatingsystem_parameter_argv and so on).
>
> It contains also a own JNI header port from the Android NDK, and own ARM
> Toolchain hook binaries to inject some command line parameters to the
> original "as" and "ld" binary calls. For "as": "--march=armv7-a
> -mfloat-abi=softfp -mfpu=vfp3" and for "ld": "--fix-cortex-a8"
>
> And important FPC parameters are -CpARMv6 -CfVFPV3
>
> I've done it, because i'm needing my own ECMAScript 5th edition engine
> called BESEN in a Android project of me.
>
> Someone can make maybe a true patch from this for FreePascal for a offical
> android target support in FreePascal. And my OpenGL ES 2.0 headers (what I
> did originally for Nokia N900 for Maemo 5) are already in the FPC
> bugtracker, which should also under Android after a single-line-change of
> the OpenGL ES library path.
>
> Benjamin 'BeRo' Rosseaux
>
>
> _______________________________________________
> fpc-pascal maillist - fpc-pascal at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
>
--
Felipe Monteiro de Carvalho
More information about the fpc-pascal
mailing list