Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
864 views
in Technique[技术] by (71.8m points)

visual studio 2010 - fatal error LNK1104: cannot open file 'kernel32.lib'

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 program at all because of this single error I'm getting. My platform is x86. Here is a snap shot if it helps:

enter image description here

I don't know what more to say. I just downloaded this compiler yesterday and it was working fine. I wanted to upgrade from 32-bit programming to 64-bit so I could work with Assembly, so I downloaded this SDK. I searched on Google and even here on Stackoverflow. Google didn't help much, but I found a post here that seemed similar to mine but the answers didn't do much justice. Does anyone know why this error is occurring and how I can get rid of it?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Check the VC++ directories, in VS 2010 these can be found in your project properties. Check whether $(WindowsSdkDir)lib is included in the directories list, if not, manually add it. If you're building for X64 platform, you should select X64 from the “Platform” ComboBox, and make sure that $(WindowsSdkDir)libx64 is included in the directories list.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...