Question

I recently installed VS2012 on my home laptop to write some software for fun in my spare time. Here's the order in which the mishap happened:

  1. Accidentally installed VS2012 for Windows 8 Apps. Realized that I actually wanted the Windows Desktop version.

  2. Uninstall the above, install VS2012 for Windows Desktop.

  3. Start writing software, everything is fine and compiles.

  4. See random VS Folder that mentions Windows 8 on my start screen - permanently delete it from computer thinking it was related to #1.

  5. My program no longer compiles, with the following common error:

error LNK1104: cannot open file 'kernel32.lib'

I searched my C-Drive to find the location of this file to try and diagnose the problem, except that it doesn't exist - I can't find it anywhere. I tried a fresh VS2012 install, and that was a bust - the same problem. I also tried to download the VS2012 SDK, but it won't install, insisting the VS2012 isn't installed, and that it's required.

What can I do!?

EDIT: I've tried to repair the install twice as well.

Was it helpful?

Solution 2

After multiple re-installs, repairs, and SDK reinstalls, the only thing that worked was a full system restore.

OTHER TIPS

You need to (re-)install the Windows SDK. That includes everything you need to develop Windows apps, including the lib files for linking to system DLLs. You'll find the Windows 8 version for download here.

I have no idea why re-installing Visual Studio didn't work for you. It should include the Windows SDK, but maybe you're installing the wrong version. Not sure if Express versions include it, for example.

Note that the Windows SDK is not the same thing as the Visual Studio SDK. The SDK part means "Software Development Kit", so they're similar. But one is for developing software for Windows, while the other is for developing software for Visual Studio (like add-ins and extensions and whatnot). The Visual Studio SDK is not going to include lib files for system DLLs, though, so that's why it didn't work. And naturally it requires Visual Studio to be installed first.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top