Linux -> Windows crosscompiler

Paolo Invernizzi via digitalmars-d-ldc digitalmars-d-ldc at puremagic.com
Tue May 16 02:08:31 PDT 2017


On Tuesday, 16 May 2017 at 08:53:32 UTC, Marvin Gülker wrote:
> On Tue, May 16, 2017 at 08:22:04AM +0000, Paolo Invernizzi via 
> digitalmars-d-ldc wrote:
>> I successfully cross compiled a simple "hello world" 
>> application on my Mac using something like:
>> 
>>    ldc2 -c -mtriple=x86_64-pc-windows-msvc main.d
>>    LIB=vc/lib lld-link main.obj ldc2_win/lib64/phobos2-ldc.lib
>> ldc2_win/lib64/druntime-ldc.lib vc/lib/msvcrt.lib
>> 
>> where I've copied a bunch of libraries in vc/lib, like the 
>> mscvrt.lib, shell32.lib etc, coming out from a previous wine 
>> attempt to use the microsoft linker in a dockerised 
>> environment.
>
> Very nice. Thank you for the information; so lld does work. I 
> have no doubts it will do it on Linux as well.
>
> Greetings
> Marvin

Just a little change, I've used libcmt.lib and not msvcrt.lib...

/P


More information about the digitalmars-d-ldc mailing list