Windows + LDC/DMD installation nightmare when changing VS versions

kinke noone at nowhere.com
Fri Jun 12 19:21:46 UTC 2020


On Friday, 12 June 2020 at 15:21:12 UTC, Guillaume Piolat wrote:
> Any idea what could be causing this?

Mentioning at least the used LDC version would be helpful; 
especially since the MSVC detection was completely overhauled 
with the v1.22 betas (and I think the previous 
non-existing-LDC_VSDIR hack wouldn't work anymore).

LDC doesn't need a reinstall when tampering the VS installations 
(there's no setup process, MSVC auto-detection runs each time). - 
Assuming you are using an LDC version < 1.22, you can manually 
check the auto-detection result by invoking `bin\msvcEnv.bat 
<x64|x86>` (e.g., by checking the env variables afterwards via 
`set`). Some leftovers from uninstalled VS installations might be 
problematic, but probably hardly the reason for a 32-bit 
libcmt.lib to be linked with a 64-bit target.

But I'd start first with checking whether LDC/dub works in a 
naked command prompt, to rule out that VisualD is interfering. 
[And adding -v to the LDC commandline is useful for debugging 
linking problems.]


More information about the Digitalmars-d-learn mailing list