Alex Rivera | Logout

visual studio 2010 express + win sdk = cannot open input file 'kernel32.lib'

Asked 2012-03-22T11:50:59.977
20

I used to compile for x64 using VS2008 express and win SDK. Recently rebuilt my machine (upgraded to 64bit Windows 7) and got latest express installed. Followed the same procedure to allow x64 targets and my sources don't link any more. no matter what I do I always get:

LINK : fatal error LNK1181: cannot open input file 'kernel32.lib'

funny enough 32bit compilation works fine.

Is this some well know problem? Google didn't give me any clues how to tackle it just a couple of mentions of the same problem but no solutions.

Is it possible to use VS 2010 with win 7 SDK to target 64bit?

thanks Pawel

Edit
Report

2 Answers

27

the solution was dead easy at the end. The trick is to point VS to win SDK that for some reason was incorrect in my case. Project Properties -> VC++ Directories -> Library Directories should point to C:\Program Files\Microsoft SDKs\Windows\v7.1\Lib\x64

answered 2012-03-23T08:42:30.573
12

Something else I found, also dead easy, is to go to Project Properties->General and set Platform Toolset to Windows7.1SDK. Wonder why this works...

answered 2012-12-13T13:22:02.160

Your Answer