Why happen this error??? Error LNK1104:cannot open file'kernel32.lib' | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Why happen this error??? Error LNK1104:cannot open file'kernel32.lib'

23rd Feb 2017, 9:13 PM
David Honner
David Honner - avatar
4 Answers
+ 2
I'm assuming that you're using Visual Studio/ Visual C++ with some version of Windows. There are several different issues that can cause this error, but usually the issue is that Visual Studio/Compiler can not find or link to the kernel32.lib file or some other file that includes it. This could be because the file is not installed (It's part of Visual C++ 2010 .NET framework, or Windows SDK), is in the incorrect location, or your settings for the path to the lib folder in Visual Studio or your project are incorrect. So, 1. Are you using Visual Studio? Which version? 2. Do you have the Windows SDK installed? 3. Is your installation of Visual C++ and .NET framework fully updated? 4. Check the actual installation of your Windows SDK Install to verify it is correct. Should be something like: C:\Program Files\Microsoft SDKs\Windows\v6.0A\Lib\Kernel32.lib 5. If all the above is ok, check your Visual Studio settings to see if the path to the Windows SDK is correct. (You'll have to search for an answer for this using your version info of VS, as I haven't used VS in years, but see last link first, it may help with this.) 6. You may also just need to reinstall the Windows SDK and/or Visual Studio/Visual C++ Some more info that may help you fix the issue: http://stackoverflow.com/questions/15053337/fatal-error-lnk1104-cannot-open-file-kernel32-lib http://stackoverflow.com/questions/3926866/lnk1104-cannot-open-file-kernel32-lib/7013508#comment21162060_7013508 http://stackoverflow.com/questions/21056470/visual-studio-error-lnk1104-cannot-open-file-kernel32-lib-only-in-wp8-proj https://social.msdn.microsoft.com/Forums/vstudio/en-US/3f4d7dcb-f06a-4b5b-80e1-07df9b452457/1link-fatal-error-lnk1104-cannot-open-file-kernel32lib?forum=vclanguage
23rd Feb 2017, 11:40 PM
ChaoticDawg
ChaoticDawg - avatar
+ 1
did you #include <iostream>?
23rd Feb 2017, 11:01 PM
Jason Hoffman
Jason Hoffman - avatar
+ 1
1_yes.2013 2_perhaps 3_yes mersi for you'r good advice
24th Feb 2017, 7:58 AM
David Honner
David Honner - avatar
0
i used this
24th Feb 2017, 7:59 AM
David Honner
David Honner - avatar