Delphi cross compiler for linux

13,321

Solution 1

The best solution is Lazarus, the delphi-like GUI for Free Pascal. If you were using "pure" vcl, without Windows internales or any special add-ons the migration will be a pice of cake :) Take a look here: http://lazarus.freepascal.org

BTW - Lazarus and FPC are true mulitplatform - you can compile code for Linux, Windows, MacOS and more with the same codebase :)

Solution 2

Your only option, if you want a Borland Delphi cross-compiler, is CrossKylix. This isn't a real cross-compiler. Instead you run the Kylix compiler for Linux under an emulated Linux environment.

Note that you'll be forced to use CLX rather than VCL and that Kylix is well and truly dead nowadays. Personally I think Wine is probably an easier and better option.

Solution 3

First of all, it all depends on what system functions you used in your programm. In most cases, there will be no possibility to cross-compile it under linux.

But, in some cases Borland Kylix can help, but, afaik, it's almost dead now.

Solution 4

Delphi 10.2 Tokyo supports Linux 64-bit Native Code Compilations.

To get some preview screenshots, click this post:

https://helloacm.com/delphi-compiles-code-to-linux-64-bit-server/

enter image description here

Share:
13,321
Daniel
Author by

Daniel

Updated on June 15, 2022

Comments

  • Daniel
    Daniel almost 2 years

    I was wondering if there is any Borland cross compiler that can make my windows code work on linux without wine.I'm using winxp with delphi 7. I was always wondering if it was possible to code same tool I coded in windows , again in Linux and how is it possible to code same tool by using pascal code in linux.Thanks

  • karlphillip
    karlphillip about 12 years
    Last update seems to be from July 31 2010. Delphi doesn't seem a good alternative for building cross-compiling applications, does it @David ?
  • David Heffernan
    David Heffernan about 12 years
    @karlphillip Well, it's good for Mac and we anticipate an updated Linux compiler in a couple of years. But, as I said, Kylix is stone cold dead.
  • karlphillip
    karlphillip about 12 years
    I didn't know its good for Mac. I guess I've been out of the loop for too long. Thanks
  • David Heffernan
    David Heffernan about 12 years
    @karl XE2 introduced mac support
  • Rob Kennedy
    Rob Kennedy about 12 years
    @Karl, 2010 seems rather recent when you consider that the tool it's wrapping was released in 2002.
  • Arnaud Bouchez
    Arnaud Bouchez about 12 years
    I downloaded and installed FPC+Lazarus using the CodeTyphon distribution. It supplied all source code of both project, most of the available third-party libraries, and allow to compile cross-platform IDEs from an easy to use interface. I was amazed about how the IDE is mature, easy to use and powerful. And much lighter than Delphi latest IDE (even with a lot of components). And compiling both IDE and compiler from source (in some minutes) is something very very very nice. It changes from the opacity of other solutions.
  • Arnaud Bouchez
    Arnaud Bouchez about 12 years
    CrossKylix has been updated in 2010 to work on Windows Seven. Works like a charm, but debugging is more difficult. I use this for several projects, from Delphi 7 IDE: for a server application, running on a cheap Linux box, it is amazing! For a GUI application, it is not a good candidate: the CLX library is just fully deprecated. And you'll need to find a Kylix original CD/iso to install it.
  • Arnaud Bouchez
    Arnaud Bouchez about 12 years
    Another IDE using FPC, for both Windows + Linux is MSEGUI. From one man, a whole cross-platform library for writing serious business applications. Very active. Executables are lighter than the one generated by Lazarus (but you lack the VCL layout: this is a whole another framework). See gitorious.org/mseide-msegui
  • Warren  P
    Warren P about 12 years
    Nevertheless, the only practical way to use Lazarus (in my opinion) is on "projects you start from scratch" -- porting a non-trivial Delphi application to use Lazarus+LCL is not practical right now, at least not when I've tried it. It's a long way from "making windows code run on Linux" without WINE, which is what the OP wants, which is, in fact, a pipe dream.
  • Marco van de Voort
    Marco van de Voort about 12 years
    That depends awfully on what is considered practical, isn't it ?
  • David Heffernan
    David Heffernan about 12 years
    @Marco No need to take it personally. If you have a big VCL project, say with 3rd party dependencies, then porting to a different platform is always hard.
  • Marco van de Voort
    Marco van de Voort about 12 years
    I don't take it personally. And yes, it is a big leap. But most of it is unavoidable, which is why I consider the remark "not practical right now" very coloured. There are practical possibilities, and most of what is not practical is fundamentally hard or impossible due to platform differences.
  • Andy k
    Andy k about 12 years
    I have been trialing Lazarus for a couple weeks now. I agree its easier if you start the GUI design from scratch and then cut and paste the application code across from the delphi app. Biggest disadvantage is that there is no support for MDI applications which I use a lot in my EDA applications as tabbed window interfaces kinda suck big time.
  • FurloSK
    FurloSK about 12 years
    @Warren: I once did a test conversion for a relative complex application from Delphi to FPC / Lazarus. The application is used to view complex 3D models of ground deformations. It was not easy, but within a couple of weeks it was as good as done.
  • Warren  P
    Warren P about 12 years
    The part that would have slowed you down is third party component sets that most delphi apps use, or Delphi VCL components that have no Lazarus equivalents.