Visual Studio 2013 error LNK1104: cannot open file 'kernel32.lib'

I'm absolutely new to windows programming (and Visual studio). When i try to build any project (VC++ or WIN32), i get the error:
Visual Studio 2013 error LNK1104: cannot open file 'kernel32.lib'

Can someone please guide me in the right direction?
is your operating system 64 bit?
I'm on a 32 bit system.
Is Windows SDK installed ? It does NOT came with Visual Studio Express version.
There is a Micrsoft SDKs folder which contains a Kernel32.lib:
C:\Program Files\Microsoft SDKs\Windows\v6.0A\Lib\Kernel32.lib

Is this the one?
Last edited on
Yes. But you are using VS2013 ?
Last edited on
Yes, its VS2013.
So what platform toolset is your VS2013 setup to use ? v6.0 looks very old, I think VS2008 or 3005 use it by default.

To see go to project properties -> General -> Platform toolset. Also check "VC++ directories" If problems persists you can manually change "Library Directories" to match your configuration (not recommended, kernel32.lib must came from VS2013, not some old version, otherwise bad things could still happen)
The platform toolset is set to:
Visual Studio 2013 (v120)

My "Library Directories" values have:
1. $(VC_LibraryPath_x86) has values:
     -- C:\Program Files\Microsoft Visual Studio 12.0\VC\lib        (no kernel32.lib here)
     -- C:\Program Files\Microsoft Visual Studio 12.0\VC\atlmfc\lib  (i can't locate the atlmfc folder)
2. $(WindowsSDK_ExecutablePath_x86) -- The macro is not defined in the macros list!
Last edited on
Install windows SDK from here:
http://msdn.microsoft.com/en-us/windows/desktop/bg162891.aspx

A restart may be required.
I just reinstalled VS2013, and all seems fine now. Thanks for the help.
Topic archived. No new replies allowed.