fatal error LNK1104: cannot open file 'kernel32.lib'

后端 未结 13 2129
既然无缘
既然无缘 2020-12-05 10:07

I\'ve been getting this error ever since I installed the .NET Framework SDK for 64-bit programming on my Visual C++ 2010 Express compiler. I can\'t compile even a simple pro

相关标签:
13条回答
  • 2020-12-05 10:29

    I had a differnt problem on Windows 10 with Visual Studio 2017 but with the same effects. I think my problems came down to VS being installed onto a drive other than "C:\". I solved the problem by Reinstalling Windows 10 SDK

    First I had to uninstall the Windows SDK (there were two versions installed). Then ran the executable. Once installed, ran visual studio and it worked fine.

    0 讨论(0)
  • 2020-12-05 10:30

    I just met and solved this problem by myself. My problem is a little different. I'm using visual studio on Windows 10. When I create the project, the Target Platform Version was automatically set to 10.0.15063.0. But there is no kernel32.lib for this version of SDK, neither are other necessary header files and lib files. So I modified the Target Platform Version to 8.1. And it worked.

    Environment:

    • Windows 10
    • Visual Studio 2015
    • Visual C++

    Solution:

    1. Open the project's Property Page;
    2. Navigate to General page;
    3. Modify Target Platform Version to the desired target platform (e.g. 8.1).
    0 讨论(0)
  • 2020-12-05 10:31

    Make sure you have in VC++ directories (Right click project, Click Property Page),

    • Include Directories: $(IncludePath)
    • List item Library Directories: $(LibraryPath)
    0 讨论(0)
  • 2020-12-05 10:34

    Change the platform toolset to: "Windows7.1SDK" under project properties->configuration properties->general

    0 讨论(0)
  • 2020-12-05 10:34

    OS : Win10, Visual Studio 2015

    Solution : Go to control panel ---> uninstall program ---MSvisual studio ----> change ---->organize = repair

    and repair it. Note that you must connect to internet until repairing finish.

    Good luck.

    0 讨论(0)
  • 2020-12-05 10:38

    enter image description here

    gero's solution worked for me.
    In Visual Studios 2012, take the following steps.
    - Go to Solution Explorer
    - Right click on your project
    - Go to Properties
    - Configuration Properties -> General
    - Platform Toolset -> change to Windows7.1SDK

    0 讨论(0)
提交回复
热议问题