cross compiling linux -> windows
kinke via digitalmars-d-ldc
digitalmars-d-ldc at puremagic.com
Wed Mar 22 08:12:47 PDT 2017
On Wednesday, 22 March 2017 at 14:03:01 UTC, Oleg B wrote:
> On Wednesday, 22 March 2017 at 13:08:07 UTC, kinke wrote:
>> 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.
>>
>> Hi Oleg, MinGW isn't supported anymore, see release notes.
>> Using the 32-bit MSVC triple `i686-pc-windows-msvc` should
>> work.
>
> Thanks, it works and now I get .obj output. ldc not support
> cross linking and I must use external tools for this?
With LDC 1.3, you'll be able to at least generate static libs for
any target. Linking executables and shared libraries is a
different beast. If you can't/don't want to use the MS linker,
you can use LLVM's LLD as cross-linker (works for MSVC targets,
but can't emit .pdb debuginfos). You'll still need the MS libs
though (Visual C runtime, WinSDK) and will have to play around
with command-line options or environment variables to get it to
work.
If there's more interest wrt. cross-linking to Windows, I can
integrate that into LDC 1.3 too, I've already prepared for this
but then put it aside as cross-linking to non-Windows via an
integrated LLD is non-trivial.
More information about the digitalmars-d-ldc
mailing list