The error cannot open the file 'kernel32.lib'

I installed VS2013 and VS2015 on Windows 7.

I have an existing C ++ Dll project that was building fine, but now it suddenly doesn’t use it with VS2015 and gives me an error:

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

From this post: fatal error LNK1104: cannot open file 'kernel32.lib' I searched for file kernel32.lib and is located here:

C:\Program Files (x86)\Windows Kits\8.1\Lib\winv6.3\um\x86

When I go to my projects Properties → Linker → Input and select Macros, I see that this path really is:

enter image description here

My Platform Toolset is installed in Visual Studio 2013 - Windows XP (v120_xp) , to which it has always been installed.

Why did my project suddenly stop building? What could have gone wrong?

+4
5

. , SDK 10.0.15063.0 , Desktop ++. SDK , Desktop ++ , .

+1

/, , "Visual ++-" .

, , , 64- Visual Studio 2010, :

, , , TFS, , a > V++ .

Resetinclude/lib path, :

"del% HOMEPATH%\AppData\Local\Microsoft\MSBuild\v4.0\Microsoft.Cpp.Win32.user.props"    .     "del% USERPROFILE%\AppData\Local\Microsoft\MSBuild\v4.0\Microsoft.Cpp.Win32.user.props"    .

Microsoft.Cpp.x64.user.props , , . , VLD.

, , 64 !

0

Visual Studio 2017. NETFXSDKDir, :

NETFXSDKDir=C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1

:

C:\Program Files (x86)\Windows Kits\10\Lib\10.0.10240.0\um\x86

:

LNK1104: 'kernel32.lib'

0

Visual Studio 2013, V++:

Project- > Properties- > V++:

0

I got this error fatal error lnk1104: I can not open the file 'kernel32.lib'. This error occurs due to the lack of a path in the VC ++ directories. To solve this problem,

  • open visual studio 2008
  • go to the section "Tools-options-Projects and solutions" - VC ++ directories - *
  • then in the right corner select Library files
  • here you need to add the path to kernel132.lib

In my case, this is C: \ Program Files \ Microsoft SDK \ Windows \ v6.0A \ Lib

Thank.

0
source

Source: https://habr.com/ru/post/1654715/


All Articles