Delphi cross compiler for linux
Asked Answered
P

4

10

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

Portaltoportal answered 11/4, 2012 at 15:36 Comment(1)
You may wait the next Delphi release (Delphi XE3) that, may be, will be Linux compatible. The EMB roadmap is not very clear but Android/linux is mentionned : blogs.embarcadero.com/jtembarcadero/2011/09/17/…Disc
H
13

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 :)

Heptad answered 11/4, 2012 at 17:0 Comment(9)
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.Endometriosis
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-mseguiEndometriosis
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.Hexagon
That depends awfully on what is considered practical, isn't it ?Cyril
@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.Nap
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.Cyril
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.British
@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.Vaivode
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.Hexagon
N
5

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.

Nap answered 11/4, 2012 at 15:39 Comment(6)
Last update seems to be from July 31 2010. Delphi doesn't seem a good alternative for building cross-compiling applications, does it @David ?Ringtailed
@Ringtailed 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.Nap
I didn't know its good for Mac. I guess I've been out of the loop for too long. ThanksRingtailed
@karl XE2 introduced mac supportNap
@Karl, 2010 seems rather recent when you consider that the tool it's wrapping was released in 2002.Gaberlunzie
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.Endometriosis
R
2

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.

Ripieno answered 11/4, 2012 at 15:40 Comment(0)
M
2

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

Margertmargery answered 19/1, 2017 at 17:8 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.