Question

I'm doing a little app that I want to distribute in different platforms, at least the 3 major ones.

Is it possible to use only Windows has the host OS to compile the binaries for Linux, Mac OS X and other supported platforms without resorting to virtual machines?

Or should I ask around in some community to help me compile on, well OS X, actually, since I can virtualize a Linux machine quite easy?

Was it helpful?

Solution

It is possible to compile from one plateform to another, it is called cross-compilation. You will find extensive informations at http://www.stack.nl/~marcov/buildfaq.pdf
The buildfaq above contains sample cross-compilation :

  • from Windows to Linux,
  • from FreeBSD to AMD64 Linux

The FPC download page contains :

  • the i386-win32 to x86_64-win64 cross-compiler
  • the i386-win32 to arm-wince cross-compiler

The FPC mailing lists are at http://www.freepascal.org/maillist.var
You will find more informations about FPC at http://www.freepascal.org/moreinfo.var

OTHER TIPS

(I'm the author of the buildfaq document above)

There are some limitations. You can't target x86 from powerpc, because powerpc misses an "extended" type. But in generally it works.

I have generated a complete Lazarus for OS X on Windows.

I would virtualize Linux, as even if you can cross-compile, it means you're not testing the binaries on their native platforms. OS X is a trickier problem.

It is not possible to compile from one platform to another. We have a Mac and use FPC quite often. If you need some help with compiling on a mac, drop me a message.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top