Can I compile for Linux from a Windows platform?

Adam D. Ruppe destructionator at gmail.com
Wed Oct 16 19:24:07 PDT 2013


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!


More information about the Digitalmars-d-learn mailing list