How to use LLD linker?

0xEAB desisma at heidel.beer
Fri Jul 6 19:34:17 UTC 2018


On Friday, 6 July 2018 at 17:32:09 UTC, SrMordred wrote:
> On Friday, 6 July 2018 at 10:55:47 UTC, Rainer Schuetze wrote:
>>
>>
>> On 06/07/2018 05:48, SrMordred wrote:
>>> [...]
>>
>> The problem is that the Digital Mars linker is called but the 
>> Microsoft linker is run, because they share the same name 
>> link.exe. For dmd/x64/32mscoff or LDC in general the latter is 
>> expected to be used. Usually dmd and ldc know how to find the 
>> appropriate one, but dub might just expect it to be found 
>> through the PATH environment variable.
>>
>> So, try to set your PATH so that the MS linker is found first.
>
> Yep, this is the way, but i could make it work yet. The PATH 
> works, but i get errors relate to libs, even running 
> vcvarsall.bat. Thats bizarre since its a fresh intallation of 
> VS. It used to work, not sure what happened. Anyway i'll give 
> up by now and try another time.
>
> I thought that LDC removed this VS dependecy.

The latest stable release didn't, at least.

Which means, if it cannot locate the Windows SDK, it will call 
`link.exe` and hope to execute something useful, which - as 
already stated before - isn't the case and usually leads to 
OptLink.


More information about the Digitalmars-d-learn mailing list