On 13/02/2020 15:54, Akomire Samson wrote:
> I am having this error on running D project using Visual studio 2019 and
> Visual D
> 
> 
> Build Log
> 
> Building Win32\Debug\LearningD.exe
> 
> Command Line
> 
> set PATH=C:\D\ldc2-1.19.0-windows-multilib\bin;C:\Program Files
> (x86)\Microsoft Visual
> Studio\2019\Community\VC\Tools\MSVC\14.24.28314\bin\HostX86\x64;C:\Program
> Files (x86)\Microsoft Visual
> Studio\2019\Community\Common7\IDE;C:\Program Files (x86)\Windows
> Kits\10\bin;%PATH%
> set LIB=C:\Program Files (x86)\Microsoft Visual
> Studio\2019\Community\VC\Tools\MSVC\14.24.28314\lib\x86;C:\Program Files
> (x86)\Windows Kits\10\Lib\10.0.18362.0\ucrt\x86
> set VCINSTALLDIR=C:\Program Files (x86)\Microsoft Visual
> Studio\2019\Community\VC\
> set VCTOOLSINSTALLDIR=C:\Program Files (x86)\Microsoft Visual
> Studio\2019\Community\VC\Tools\MSVC\14.24.28314\
> set VSINSTALLDIR=C:\Program Files (x86)\Microsoft Visual
> Studio\2019\Community\
> set WindowsSdkDir=C:\Program Files (x86)\Windows Kits\10\
> set WindowsSdkVersion=10.0.18362.0
> set UniversalCRTSdkDir=C:\Program Files (x86)\Windows Kits\10\
> set UCRTVersion=10.0.18362.0
> "C:\Program Files (x86)\VisualD\pipedmd.exe" -deps
> Win32\Debug\LearningD.dep ldc2 -m32 -g -d-debug -X
> -Xf="Win32\Debug\LearningD.json" -of="Win32\Debug\LearningD.exe"
> -L/PDB:"Win32\Debug\LearningD.pdb" -L/SUBSYSTEM:CONSOLE -L/noopttls
> -od="Win32\Debug" LearningD.d
> if %errorlevel% neq 0 goto reportError
> if not exist "Win32\Debug\LearningD.exe" (echo
> "Win32\Debug\LearningD.exe" not created! && goto reportError)
> 
> goto noError
> 
> :reportError
> echo Building Win32\Debug\LearningD.exe failed!
> 
> :noError
> Output
> 
> LINK : fatal error LNK1181: cannot open input file 'kernel32.lib'
> Error: C:\Program Files (x86)\Microsoft Visual
> Studio\2019\Community\VC\Tools\MSVC\14.24.28314\bin\HostX86\x64\link.exe
> failed with status: 1181
> Building Win32\Debug\LearningD.exe failed!
> 
> 
> 
> I will appreciate any help.

Maybe you don't have a Windows SDK installed? With the settings as shown
above, kernel32.lib would be expected to exist in "c:\Program Files
(x86)\Windows Kits\10\Lib\10.0.18362.0\um\x86".

If that looks ok, maybe it has to do with using LDC to do the linking.
Does it work when using DMD instead? Or try compilation model "Separate
compile and link".

Reply via email to