Reputation: 2036
I'm using Visual Studio 2012 Express on Windows 7 with Windows SDK 7.1, 8.0, and 8.1 installed. For some reason, $(WindowsSDK_Library_Path_x64)
is set to
C:\Program Files (x86)\Windows Kits\8.0\lib\winv6.3\um\x64
instead of
C:\Program Files (x86)\Windows Kits\8.0\lib\win8\um\x64
.
Similarly with _arm
and _x86
. This causes all sorts of problems beginning with "cannot open file kernel32.lib". How do I fix this without renaming the directory itself? I had just installed SDK 8.0 so it can't be because it was corrupted by another program. Thanks.
I searched my SDK directory and I found the file C:\Program Files (x86)\Windows Kits\8.0\SDKManifest.xml
which contains
<FileList
DisplayName = "Windows 8.1"
PlatformIdentity = "Windows, Version=8.1"
TargetFramework = ".NETCore,version=v4.5.1;.NETFramework,version=v4.5.1"
MinVSVersion = "12.0"
MinOSVersion = "6.3.0"
MaxOSVersionTested = "6.3.0"
UnsupportedDowntarget = "Windows, version=8.0">
<File Reference = "Windows">
<ToolboxItems VSCategory = "Toolbox.Default"/>
</File>
</FileList>
Could the winv6.3 come from this?
Upvotes: 4
Views: 2294
Reputation: 41
I had a similar build error in VS 2015, on a VS2012 c++ project
LINK : fatal error LNK1104: cannot open file 'kernel32.lib'
Solution was to changing: $(WindowsSdkDir)lib\winv6.3\um\x64; to $(WindowsSdkDir)lib\win8\um\x64;
in the Windows.props file. "C:\Program Files (x86)\Windows Kits\8.0\DesignTime\CommonConfiguration\Neutral\Windows.props"
Upvotes: 1
Reputation: 51
I had the same problem. I eventually found the incorrect path in this file: "C:\Program Files (x86)\Windows Kits\8.0\DesignTime\CommonConfiguration\Neutral\Windows.props"
After changing winv6.3 to win8 in the errant paths and restarting the IDE all was well.
Upvotes: 5