msvc linker error: can't find kernel32.lib

Rainer Schuetze via digitalmars-d-ldc digitalmars-d-ldc at puremagic.com
Thu Nov 20 10:51:54 PST 2014


On 20.11.2014 15:29, Dustin wrote:
> I compiled ldc on Windows 7 following the instructions in the wiki, no
> issues there. I can compile D programs just fine with no linker errors
> only if I launch a visual studio 64 bit developer command prompt.
> However I want to use visualD to compile my programs. Visual studio
> doesn't even set the environment variables for the linker because I get
> the same "missing kernel32.lib" error. I tried reading vcvars64.bat,
> which is called when I launch the developer command prompt, to
> understand how the environment is set up, but I got totally lost trying
> to read it. Any suggestions on how I can permenantly set up my
> environment so visual studio's linker is happy?

I guess you must add something like

$(VCInstallDir)\lib\amd64
$(WindowsSdkDir)Lib\winv6.3\um\x64

to "Tools->Options->Projects and Solutions->Visual D Settings->LDC 
Directories->x64->Library paths".

Especially the Windows SDK folder might be different for your installed SDK.


More information about the digitalmars-d-ldc mailing list