cross compiling linux -> windows

Laeeth Isharc via digitalmars-d-ldc digitalmars-d-ldc at puremagic.com
Wed Mar 22 17:18:14 PDT 2017


On Wednesday, 22 March 2017 at 12:35:16 UTC, Oleg B wrote:
> Hello. I'm try to cross build example program and get some 
> error.
>
> % ldc2 -mtriple=i686-w32-mingw32.static print_void_array.d
> /home/obutko/workspace/ldc2-1.2.0-beta1-linux-x86_64/bin/../import/core/stdc/wchar_.d(80): Error: undefined identifier 'FILE'
> ...
> /home/obutko/workspace/ldc2-1.2.0-beta1-linux-x86_64/bin/../import/core/stdc/stdio.d(830): Error: undefined identifier 'FILE'
> ...
>
> and I don't understand how to fix it. If I add flag 
> `-d-version=CRuntime_Windows` compiler fails with `Error: 
> version identifier 'CRuntime_Microsoft' is reserved and cannot 
> be set`
>
> Maybe I have fundamentally wrong logic for doing this?

fwiw dmd works under wine, last I checked.  I have no idea about 
ldc.


More information about the digitalmars-d-ldc mailing list