www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.ldc - msvc linker error: can't find kernel32.lib

reply "Dustin" <dustin.sneeden gmail.com> writes:
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?
Nov 20 2014
parent reply Rainer Schuetze <r.sagitario gmx.de> writes:
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.
Nov 20 2014
parent "Dustin" <dustin.sneeden gmail.com> writes:
I figured it out, just needed to give the linker a few import 
paths. Thanks!
Nov 20 2014