Linking issues VisualD generated vs Dub generated projects
Rainer Schuetze
r.sagitario at gmx.de
Thu May 23 06:15:02 UTC 2019
On 22/05/2019 18:35, ShadoLight wrote:
> Wow... have now found I cannot fix this linking issue by sticking just
> with libs from SDK 8.1.
>
> If I remove the search path to libs from SDK 10.0, a basic D app now
> fails to link because of a missing 'libucrtd.lib', which I can only find
> under SDK 10. And likewise can only find 'user32.lib' under SDK 8.1.
>
> This is becoming really strange now... do I really need 2 versions of
> the Windows SDK to be able to build using VisualD under VS 2015? Or are
> one (or both) of my SDKs broken?
>
> To make linking succeed my lib search paths for x64 now looks like this:
>
> $(VCINSTALLDIR)lib\amd64
> "c:\Program Files (x86)\Windows Kits\8.1\Lib\winv6.3\um\x64" <-SDK 8.1
> path hard-coded
> $(UniversalCRTSdkDir)Lib\$(UCRTVersion)\ucrt\x64 <-'Default' SDK; v10.0
> in this case
> $(UniversalCRTSdkDir)Lib\$(UCRTVersion)\ucrt\arm64
> $(DMDInstallDir)windows\bin
I suspect that you have the UCRT libraries in the Win10 folder (where
they usually are), but no Win10 SDK installed. It can also happen that
both exist, but with different versions.
So your patch to add the Win8.1 SDK looks good. Visual D should also set
it to "$(WindowsSdkDir)Lib\winv6.3\um\x64" as the default at first start
(but doesn't change the values once they have been edited).
> I also don't understand (even thought this is not an issue for me at the
> moment since I am not targeting ARM), how the 'default' global search
> paths here for both ARM and x32/x64 can co-exist...
> $(UniversalCRTSdkDir)Lib\$(UCRTVersion)\ucrt\x64
> $(UniversalCRTSdkDir)Lib\$(UCRTVersion)\ucrt\arm64
Yes, the arm library should be removed, aswell as the dmd bin directory.
More information about the Digitalmars-d-ide
mailing list