10
votes

I downloaded Lazarus, but have worked with Embarcadero Delphi IDE too. I have a question about building cross-platform Delphi applications.

How can I build them under win32 environment? I read the wiki from Lazarus site, that explains how to do it, but I still do not understand it. Is is possible to build and compile application under win32 environment for Linux and MacOS? If it is possible, can someone explain ste-by-step how to do it exactly.

EDIT: Now is the time for talking about the new XE2 version of the Delphi IDE I think :)

Thanks

3
FPC/Lazarus <> Delphi, not matter how compatible it is. Right now you can't build "cross-platform Delphi applications" (IMHO Prims is not Delphi, despite its name...), until Embarcadero delivers its cross-platform product (planned, but not available yet)user160694
Idsadon, that's not what evilone asked.RBA
the best place to ask this question would be the Lazarus forum. I am sure that someone from that stie will help you.Wodzu
still haven't got any answer that satisfied my needs...evilone
A discussion of the unreleased XE2 would not be constructive. If you have specific questions after it's released, they'd be worth asking. Reviving an almost 9 month old question to do so is not.Ken White

3 Answers

6
votes

While crosscompiling to a non windows target is possible (and not that hard), getting used to fpc/lazarus and crosscompiling in one first step is a bridge too far. This because Linux is not a very homogenous target and dealing with this variation requires some understanding how libraries and linking works on Linux. This defeats one-button downloadable cross-compile setups to "general" linux. I know, such one-button thingies that work out of the box for everyone would be great, but it is just not going to happen (or only forvery limited distribution-version combinations)

Crosscompiling with FPC is not extremely difficult or rocket science, but the amount of jargon and details can flabbergast uninitiated people, and without background knowledge it is hard to diagnose problems as a result of minor misconfigurations

I recommend to first familiarize yourself with Lazarus/FPC, and only then make the crosscompilation leap. (and the already mentioned buildfaq names some reasons).

Bottomline: install lazarus on Windows and start porting your app. If that succeeds, start using a linux install (or VM) to familiarize yourself with Linux, and Lazarus under it. You'll need a linux install anyway to test.

Only then start thinking about crosscompiling to speed up the process.

8
votes
3
votes

CodeTyphon is a powerful Lazarus/FPC one click easy installation package for cross platform native development. It already supports 4 CPU/OS hosts (Win32, Win64, Linux32, Linux64), and 16 CPU/OS targets (arm-Wince, arm-Linux, arm-Embedded, arm-gba, arm-nds, i386-Win32, i386-Linux, i386-FreeBSD, i386-Haiku, x86_64-Win64, x86_64-Linux, x86_64-FreeBSD, powerpc-Linux, powerpc64-Linux, sparc-Linux, sparc-Solaris). More are supported in Lazarus/FreePascal, but others are not yet integrated in CodeTyphon. Did I mention that it is free? One code to rule them all ;-)

The point is that you don't have to waste days for setting up your cross platform environment, since someone has already done the hard work for you.