问题描述
我曾经使用 VS2008 express 和 win SDK 为 x64 编译.最近重建了我的机器(升级到 64 位 Windows 7)并安装了最新的 express.遵循相同的程序以允许 x64 目标,并且我的源不再链接.无论我做什么,我总是得到:
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:
链接:致命错误 LNK1181:无法打开输入文件 'kernel32.lib'
足够有趣的 32 位编译工作正常.
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.
是否可以将 VS 2010 与 win 7 SDK 一起用于 64 位?
Is it possible to use VS 2010 with win 7 SDK to target 64bit?
谢谢帕维尔
推荐答案
最终的解决方案很简单.诀窍是让 VS 赢得 SDK,因为某些原因在我的情况下是不正确的.项目属性 ->VC++ 目录 ->库目录
应该指向C:Program FilesMicrosoft SDKsWindowsv7.1Libx64
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 FilesMicrosoft SDKsWindowsv7.1Libx64
这篇关于Visual Studio 2010 express + win sdk = 无法打开输入文件“kernel32.lib"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!