Can I compile for Linux from a Windows platform?

H. S. Teoh hsteoh at quickfur.ath.cx
Wed Oct 16 19:40:12 PDT 2013


On Thu, Oct 17, 2013 at 04:24:07AM +0200, Adam D. Ruppe wrote:
> On Thursday, 17 October 2013 at 01:18:42 UTC, Jonathan M Davis
> wrote:
> >In general, you can't cross-compile across operating systems.
> 
> Linux to Windows is pretty easy. You can just run the Windows
> version of dmd under wine on linux to make exes, or you can compile
> gcc (and presumably gdc, though I've never tried) for linux to make
> exes.
> 
> I'm sure similar techniques could be used, in theory at least, to do
> Windows to Linux, but I've never seen it done.... and you're
> absolutely right about the versions not matching up. Hell, it is
> hard enough to get a binary from one linux box working on another
> linux box!

Linux is rather heavy on the compile-from-source philosophy.
Distributing binaries in Linux is fraught with peril and generally not
done, except by distro vendors (who actually have a fighting chance of
getting it right) and companies who are paranoid about distributing
source (who generally *don't* get it right, thus are unable to reach a
significant proportion of the Linux market).


T
-- 
Computers aren't intelligent; they only think they are.


More information about the Digitalmars-d-learn mailing list