Thread overview
Cross compile windows programs on linux
Aug 24, 2018
John Burton
Aug 24, 2018
kinke
Aug 24, 2018
John Burton
Aug 24, 2018
Radu
Aug 24, 2018
Jonathan M Davis
August 24, 2018
Is in the subject. Are there any cross compilers that will run on a linux system but compile D code using Win32 into a windows .exe file, preferably 64 bit? I can find hints of cross compilers but not really seen anything packaged up?
August 24, 2018
On Friday, 24 August 2018 at 13:10:40 UTC, John Burton wrote:
> Is in the subject. Are there any cross compilers that will run on a linux system but compile D code using Win32 into a windows .exe file, preferably 64 bit? I can find hints of cross compilers but not really seen anything packaged up?

See https://forum.dlang.org/post/acjcrfvxloapdlapzygn@forum.dlang.org.
August 24, 2018
On Friday, 24 August 2018 at 15:26:30 UTC, kinke wrote:
> On Friday, 24 August 2018 at 13:10:40 UTC, John Burton wrote:
>> Is in the subject. Are there any cross compilers that will run on a linux system but compile D code using Win32 into a windows .exe file, preferably 64 bit? I can find hints of cross compilers but not really seen anything packaged up?
>
> See https://forum.dlang.org/post/acjcrfvxloapdlapzygn@forum.dlang.org.

Oh thank you.
I did a search but somehow missed that
August 24, 2018
On Friday, 24 August 2018 at 16:30:56 UTC, John Burton wrote:
> On Friday, 24 August 2018 at 15:26:30 UTC, kinke wrote:
>> On Friday, 24 August 2018 at 13:10:40 UTC, John Burton wrote:
>>> Is in the subject. Are there any cross compilers that will run on a linux system but compile D code using Win32 into a windows .exe file, preferably 64 bit? I can find hints of cross compilers but not really seen anything packaged up?
>>
>> See https://forum.dlang.org/post/acjcrfvxloapdlapzygn@forum.dlang.org.
>
> Oh thank you.
> I did a search but somehow missed that

LLD has a nasty bug when using large static data members. https://bugs.llvm.org/show_bug.cgi?id=38645

I got access violations in the resulting binary when using it for linking complex apps. Be aware.
August 24, 2018
On 08/24/2018 12:30 PM, John Burton wrote:
> On Friday, 24 August 2018 at 15:26:30 UTC, kinke wrote:
>> On Friday, 24 August 2018 at 13:10:40 UTC, John Burton wrote:
>>> Is in the subject. Are there any cross compilers that will run on a linux system but compile D code using Win32 into a windows .exe file, preferably 64 bit? I can find hints of cross compilers but not really seen anything packaged up?
>>
>> See https://forum.dlang.org/post/acjcrfvxloapdlapzygn@forum.dlang.org.
> 
> Oh thank you.
> I did a search but somehow missed that

You could probably also just run the windows version of the compiler under wine. I think I remember hearing of people doing that.
August 24, 2018
On Friday, August 24, 2018 3:28:37 PM MDT Nick Sabalausky (Abscissa) via Digitalmars-d-learn wrote:
> On 08/24/2018 12:30 PM, John Burton wrote:
> > On Friday, 24 August 2018 at 15:26:30 UTC, kinke wrote:
> >> On Friday, 24 August 2018 at 13:10:40 UTC, John Burton wrote:
> >>> Is in the subject. Are there any cross compilers that will run on a linux system but compile D code using Win32 into a windows .exe file, preferably 64 bit? I can find hints of cross compilers but not really seen anything packaged up?
> >>
> >> See https://forum.dlang.org/post/acjcrfvxloapdlapzygn@forum.dlang.org.
> >
> > Oh thank you.
> > I did a search but somehow missed that
>
> You could probably also just run the windows version of the compiler under wine. I think I remember hearing of people doing that.

That will probably work, but actually running the program that you build is another story. I actually originally developed the Windows-specific portion of std.datetime using wine, and I ended up with some bugs in my code, because the way that wine behaved when running it did not actually match what Windows did like it was supposed to. However, what dmd itself does has so little to do with the Win32 API that building code using dmd shouldn't be a problem.

- Jonathan M Davis