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
1.6k views
in Technique[技术] by (71.8m points)

visual c++ - error cannot open file 'kernel32.lib'

I have installed VS2013 and VS2015 on Windows 7.

I have an existing C++ Dll project that was building fine but now all of a sudden it wont build using VS2015 and gives me the error:

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

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

C:Program Files (x86)Windows Kits8.1Libwinv6.3umx86

When I go to my Projects Properties-->Linker-->Input and select Macros I see that this path is indeed there:

enter image description here

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

Why has my Project all of a sudden stopped building? What could have gone wrong?

See Question&Answers more detail:os

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

1 Answer

0 votes
by (71.8m points)

I had this similar problem today with Visual Studio 2013 when I changed my VC++ Directories:

Project->Properties->VC++ Directories: Include Directories


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

...