-1

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.

4

2 回答 2

0

您需要(重新)安装 Windows SDK。这包括开发 Windows 应用程序所需的一切,包括lib链接到系统 DLL 的文件。您可以在此处找到可供下载的 Windows 8 版本。

我不知道为什么重新安装 Visual Studio 对您不起作用。它应该包括 Windows SDK,但也许您安装了错误的版本。例如,不确定 Express 版本是否包含它。

请注意,Windows SDK 与Visual Studio SDK 不同。SDK 部分的意思是“软件开发工具包”,所以它们是相似的。但一种是为Windows开发软件,另一种是为Visual Studio开发软件(如插件和扩展等)。不过,Visual Studio SDK 不会包含lib系统 DLL 的文件,所以这就是它不起作用的原因。当然,它需要先安装 Visual Studio。

于 2013-04-22T07:13:39.773 回答
0

在多次重新安装、修复和 SDK 重新安装之后,唯一有效的方法是完整的系统还原。

于 2013-04-23T14:00:02.770 回答