Recent

Author Topic: Freepascal code execute on android device  (Read 1035 times)

Packs

  • Sr. Member
  • ****
  • Posts: 492
Freepascal code execute on android device
« on: February 22, 2025, 06:57:04 pm »
Freepascal code execute on android device.

If anyone is tired.

Please guide me

Narciso

  • New Member
  • *
  • Posts: 10
Re: Freepascal code execute on android device
« Reply #1 on: February 22, 2025, 08:10:41 pm »

MarkMLl

  • Hero Member
  • *****
  • Posts: 8533
Re: Freepascal code execute on android device
« Reply #2 on: February 22, 2025, 11:00:51 pm »
Is this a question or a statement?

If it's a question, is it a request for help?

If it's a request for help, where is the word "please"?

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Logitech, TopSpeed & FTL Modula-2 on bare metal (Z80, '286 protected mode).
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

TRon

  • Hero Member
  • *****
  • Posts: 4377
Re: Freepascal code execute on android device
« Reply #3 on: February 22, 2025, 11:04:22 pm »
As always without any context, thus there you go. Requires a browser on the device.
Today is tomorrow's yesterday.

Packs

  • Sr. Member
  • ****
  • Posts: 492
Re: Freepascal code execute on android device
« Reply #4 on: February 23, 2025, 05:22:45 am »
I want to call freepascal code inside kotlin

MarkMLl

  • Hero Member
  • *****
  • Posts: 8533
Re: Freepascal code execute on android device
« Reply #5 on: February 23, 2025, 09:31:28 am »
In that case what you should be asking is this:

Can somebody tell me what I have to do to integrate something written in Object Pascal with a program written in Kotlin running on Android please?

Next time try that approach. Please.

It's self-evident that code written using FPC can run on Android, since people regularly discuss using Lazarus for that platform. (I've done that to a very small extent).

However you would also do yourself a favour if you explained whether you were trying to write a program (to be invoked by Kotlin) or a library (to be linked into a Kotlin program): in short very much like https://forum.lazarus.freepascal.org/index.php/topic,70290.msg547748.html#msg547748 which you posted a couple of days ago :-/

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Logitech, TopSpeed & FTL Modula-2 on bare metal (Z80, '286 protected mode).
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

Packs

  • Sr. Member
  • ****
  • Posts: 492
Re: Freepascal code execute on android device
« Reply #6 on: February 23, 2025, 09:41:49 am »
Dear Sir,

I accept my English is not good.

I have created some code in lazarus and I want to use inside android kotlin .

same code can be reuse .

I have tried javascript inside kotlin it is working so I am considering pascal also support the same.

Please guide me.

MarkMLl

  • Hero Member
  • *****
  • Posts: 8533
Re: Freepascal code execute on android device
« Reply #7 on: February 23, 2025, 10:12:48 am »
Dear Sir,

I accept my English is not good.

I have created some code in lazarus and I want to use inside android kotlin .

same code can be reuse .

I have tried javascript inside kotlin it is working so I am considering pascal also support the same.

Please guide me.

This isn't so much an English thing as an overall approach thing. You didn't help yourself by abandoning your earlier question and asking a vaguer one: you'd have done better by leaving it a few days and than posting a followup (i.e. commenting to your original question) along the lines of "does anybody have any suggestions at all, please?".

Your other posting talks about making a .so library. It's certainly possible to do that using FPC and even- within limits- using Lazarus. The key is that both the main program and the library will have their own heap etc., so you have to be extremely careful how you move data between them /particularly/ strings (other than shortstrings) and dynamic arrays.

From the Kotlin side: I really can't help, and using the forum's search facility (which I presume you know about, and was how I was reminded of the earlier version of your question) I've can't see much relevant discussion.

My suggestion would be that you should practice setting up a .so using FPC and make sure that you can call it (possibly from FPC, possibly from Lazarus), and then ask about the Kotlin aspect elsewhere ("I have a .so written using FPC, I'm confident it's functional, please could somebody tell me how I can integrate that with a Kotlin program on Android").

My apologies if I sound critical, but I'm really trying to help you improve the way you're going about things since- apart from anything else- improvements to how you ask questions in this form will help you in others.

Oh, and do remember that thanking people and summarising what approach you've selected to solve a problem will always go down well.

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Logitech, TopSpeed & FTL Modula-2 on bare metal (Z80, '286 protected mode).
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

 

TinyPortal © 2005-2018