Freepascal code execute on android device lazarus / 43-Android ---------------------------------------------------------------------- Packs · 2025-02-22 17:57 Freepascal code execute on android device. If anyone is tired. Please guide me ---------------------------------------------------------------------- Narciso · 2025-02-22 19:10 Did you look at https://wiki.lazarus.freepascal.org/Android_tutorial ---------------------------------------------------------------------- MarkMLl · 2025-02-22 22:00 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 ---------------------------------------------------------------------- TRon · 2025-02-22 22:04 As always without any context, thus there you go. Requires a browser on the device. ---------------------------------------------------------------------- Packs · 2025-02-23 04:22 I want to call freepascal code inside kotlin ---------------------------------------------------------------------- MarkMLl · 2025-02-23 08:31 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.h tml#msg547748 which you posted a couple of days ago :-/ MarkMLl ---------------------------------------------------------------------- Packs · 2025-02-23 08:41 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 · 2025-02-23 09:12 Quote from: Packs on February 23, 2025, 09:41:49 amDear 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