[fpc-pascal] Re: Android JNI failing in Galaxy S4

Felipe Monteiro de Carvalho felipemonteiro.carvalho at gmail.com
Wed May 22 16:28:08 CEST 2013


On Wed, May 22, 2013 at 3:54 PM, md at rpzdesign.com <md at rpzdesign.com> wrote:
> Watch out when the Intel mobile processors come along, I doubt they will be
> ARM 7 compatible.
> But they may be x86!

That's not problem. If we have x86 too, then instead of doing 2 clicks
to build the project, I'll have to do 4 clicks. 1 to build for arm, 1
to change the build mode, 1 to build for x86 and 1 to build both apks

Doesn't change much to me =)

On Wed, May 22, 2013 at 3:56 PM, md at rpzdesign.com <md at rpzdesign.com> wrote:
> Any comments on how you would mix C and pascal into the same binary
> for JNI/Android?

Maybe in the same way that is done in desktops?
via {$L objectfile.o} + headers with the directive external

Something like:

uses ctypes;
function something_from_c(params: cint): cint; cdecl; external;

I think it is $L ... I haven't utilized this feature in a long time.

Your c code needs to be compiled for arm-android of course.

-- 
Felipe Monteiro de Carvalho



More information about the fpc-pascal mailing list