


{"id":233729,"date":"2022-08-24T17:59:05","date_gmt":"2022-08-24T17:59:05","guid":{"rendered":"\/forum\/forums\/topic\/link-fatal-error-lnk1104-cannot-open-file-kernel32-lib-2\/"},"modified":"2022-08-24T17:59:05","modified_gmt":"2022-08-24T17:59:05","slug":"link-fatal-error-lnk1104-cannot-open-file-kernel32-lib-2","status":"closed","type":"topic","link":"https:\/\/innovationspace.ansys.com\/forum\/forums\/topic\/link-fatal-error-lnk1104-cannot-open-file-kernel32-lib-2\/","title":{"rendered":"LINK : fatal error LNK1104: cannot open file &#8216;kernel32.lib&#8217;"},"content":{"rendered":"<p>I am using Ansys Fluent 2021 R2 and VS 2022 Community. I get the errror:<\/p>\n<p>&#8220;<\/p>\n<p>LINK : fatal error LNK1104: cannot open file &#8216;kernel32.lib&#8217;<\/p>\n<p>NMAKE : fatal error U1077: &#8216;&#8221;C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.33.31629\\bin\\HostX86\\x64\\link.EXE&#8221;&#8216; : return code &#8216;0x450&#8217;<\/p>\n<p>&#8220;<\/p>\n<p>when trying to compile my UDF c code. I modified my udf.bat file to include the newer version of VS2022 to select it for its compiler. I moved all of the header files to the &#8216;main&#8217; folder in my version of fluent as well as all the libraries it is referencing including kernel32.Lib. I am not sure why I am still getting this error. Within VS2022 I started a new project that contains my c files and included all the directories needed to build the file and I do get a few errors regarding syntax and undefined&nbsp; CX_DLL_PTF_void from the header files that ansys fluent provides. I changed the Windows SDK Version to 10.0.22621.0 (the lastest Windows 11 SDK version since I have windows 11 on my desktop) and added my windows enviroment path &#8220;C:\\Program Files (x86)\\Windows Kits\\10\\Lib\\10.0.22621.0\\um\\arm64, C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.33.31629\\lib\\onecore\\x86, C:\\Program Files (x86)\\Windows Kits\\10\\Lib\\10.0.22621.0\\um\\x64,C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.33.31629\\bin\\HostX86\\x64\\,C:\\Program Files\\ANSYS Inc\\v212\\fluent\\ntbin\\clang\\10\\Include\\10.0.18362.0\\ucrt, and C:\\Program Files\\ANSYS Inc\\v212\\fluent\\ntbin\\clang\\lib &#8221; that should contain all the libraries and header files.&nbsp;<\/p>\n","protected":false},"template":"","class_list":["post-233729","topic","type-topic","status-closed","hentry","topic-tag-fluent-ansys-1","topic-tag-fluent-cfd-ansys-1","topic-tag-2021R2-1","topic-tag-udf-compiler-problem","topic-tag-user-defined-function-1"],"aioseo_notices":[],"acf":[],"custom_fields":[{"0":{"_bbp_subscription":["1871","15977","199"],"_bbp_author_ip":["23.218.93.53"]," _bbp_last_reply_id":["0"]," _bbp_likes_count":["0"],"_btv_view_count":["5169"],"_bbp_topic_status":["unanswered"],"_bbp_status":["publish"],"_bbp_topic_id":["233729"],"_bbp_forum_id":["27792"],"_bbp_engagement":["199","1871","15977"],"_bbp_voice_count":["3"],"_bbp_reply_count":["6"],"_bbp_last_reply_id":["233783"],"_bbp_last_active_id":["233783"],"_bbp_last_active_time":["2022-08-25 13:35:18"]},"test":"zwhiteandrew-cmu-edu"}],"_links":{"self":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/topics\/233729","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/topics"}],"about":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/topics\/233729\/revisions"}],"wp:attachment":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/media?parent=233729"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}