Cross Compiler Lniux to Win32

Johannes Pfau nospam at example.com
Sat Dec 15 11:46:10 PST 2012


Am Sat, 15 Dec 2012 14:56:47 +0100
schrieb "Nekroze" <nekroze at eturnilnetwork.com>:

> On Saturday, 15 December 2012 at 13:42:11 UTC, r_m_r wrote:
> > On 12/15/2012 06:35 PM, Nekroze wrote:
> >> So straight up, is DMD capable of cross compiling on linux 
> >> targeting
> >> windows? I have never used the alternative D compilers (GDC, 
> >> LDC etc)
> >> but are they capable of this perhaps?
> >
> > You can try: http://gdcproject.org/wiki/Cross%20Compiler
> >
> > check this thread for some details: 
> > http://forum.dlang.org/thread/k75guj$16pk$1@digitalmars.com
> >
> > regards,
> > r_m_r
> 
> 
> Thanks r_m_r, this seems to be what i wanted a canadian-cross 
> compiler, just didnt have the right term for it. Will have a look 
> into this. Cheers!

You don't need a canadian cross compiler. The terminology is a little
confusing, but a canadian cross compiler is if you compile _the
compiler_ on OS1, run the compiler on OS2 and the compiler generates
code for OS3. (and OS1 != OS2, OS2 != OS3)
In your case OS1==OS2==linux and OS3==mingw. This is a normal cross
compiler.

The instructions here:
http://gdcproject.org/wiki/Cross%20Compiler/crosstool-NG
should work. But the gdc windows binaries published by Daniel Green
have some additional bug fixes which are not part of the official gdc
source code so you won't get those fixes with your cross compiler.


More information about the Digitalmars-d-learn mailing list