views:

142

answers:

2

I have a project written in Lazarus on Windows, but I want to cross-compile it for Linux on my Windows computer. How can I do this?

A: 

AFAIK you do not as Delphi has no equivalent language on Linux, so stick with a portable environment or language. There are many good ones to choose from, and you seem to have fallen in love with many of them before. ;-)

Dirk Eddelbuettel
If you read it closely, the question is actually about crosscompiling; Lazarus already exists on both Windows and Linux.
Ignacio Vazquez-Abrams
I can use Kylix that is a Delphi port for Linux made by Borland, but I'm using Lazarus, that is cross-platform(Linux, Windows, Mac...).
Nathan Campos
Lazarus **is** portable, as it is a common collection of platform-independent components based around a platform independent compiler (**FreePascal**).
Kornel Kisielewicz
@Dirk I haven't fell in love with many languages, I'm just learning as much as I can to see which one I like more, when I found this language I'm going to stick on it and learn all of it.
Nathan Campos
You cannot use Kylix, that's dead. But FreePascal you can.
Stephan Eggermont
My bad. Thanks for the correction.
Dirk Eddelbuettel
+1 Because I've seen that was your bad **;-)**
Nathan Campos
+3  A: 

Unfortunately cross compiling in this direction is not (easily) possible now -- contrary to the other way around. Your best bet is setting up VMWare or another virtual machine with Linux installed, and compiling it there.

Kornel Kisielewicz
This is definitely the easiest way. Using FreePascal
Stephan Eggermont
It is possible, and doable if you know your way around Linux' buildsystem. The build faq gives some pointers. But Kornel is right that is easier to simply create some linux. You'll need it anyway, since even the building ON Windows needs libraries from the Linux distros that you target.
Marco van de Voort