Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8483549
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T20:08:08+00:00 2026-06-10T20:08:08+00:00

Trying to port a Delphi library to Android. Free Pascal has Android/ARM support –

  • 0

Trying to port a Delphi library to Android. Free Pascal has Android/ARM support – a prebuilt compiler for Windows is available. However, Android NDK now supports MIPS and x86 as well. What’s the status of support for those in FPC? For now, my project is more or less CPU agnostic – the native bits are built for all four supported architectures. Don’t want to let go of that.

I’m not after the full cycle of Android development in Pascal – just an algorithm library that does no I/O. I tried translating it into C with p2c, but the translator chokes on the sources.

Should I just try and build cross-compiler for the relevant CPU with Linux, and then link against the NDK libraries?

EDIT: I’ve built the cross-compiler for Intel/Linux from the sources of the Android branch. It works, except you have to invoke ppcross386 to compile, not fpc. The latter, it seems, ignores the -Tlinux option and invokes the Intel/Win32 compiler.

EDIT2: with a small change to the makefile and sources, the MIPS cross-compiler builds. However, as building moves on to the cross-CPU RTL, it errors out almost right away.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T20:08:10+00:00Added an answer on June 10, 2026 at 8:08 pm

    EDIT, finally: support for Android/MIPSEL compilation target is available in the FPC trunk. Export the latest, build the crosscompiler, code away.


    While support for MIPS ISA can be found here and there in the FP sources, it’s not officially done yet. Waiting for the 2.7 release.

    In the meantime, there’s support for compiling to Java bytecode in the trunk, it’s documented in the FP wiki. Maybe I can leverage that as a stopgap…

    EDIT: Free Pascal over JVM works in general on Android, but its rules are somewhat different from regular Pascal. Otherwise correct Pascal conks out when compiled to JVM. So it’s unfit for porting large bodies of legacy Pascal code that was not written with JVM in mind in the first place.

    EDIT: I got my FPC project working on MIPS/Android, but my recipe is not fit for general consumption, because the scope of Pascal RTL usage in my project is very limited. It involves cross-compiling from Pascal to MIPS assembly (targeting MIPSEL/Linux, available in the FPC trunk), then feeding the generated assembly sources to the NDK build system, providing along a C/assembly reimplementation of a limited subset of Pascal RTL.

    The whole body of Pascal RTL is big and scary. My solution, which involves reimplementing the Pascal RTL in C from scratch, is, well, the opposite of generally applicable.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to port libCurl to android with SSL support, step one would
I am trying to port an application from Windows to Linux. In Windows I
I am trying to port a native C++ library to C++/CLI, so I can
I'm trying to port an app from Windows 8 to Windows Phone 7 and
I'm trying to port a desencrypt function i have in Delphi to C#. in
im trying to port an iphone app to android. i am completely new to
I am trying to port some C++ code from Windows to Solaris(Unix). There are
I'm currently trying to port a SIP stack library (pjSIP) to the PSP Console
I'm trying to port an application to Mono, however Mono doesn't support Application Settings.
I am trying to port a windows application based on WxWidgets 2.8.9 to MacOS

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.