Hi,
You got an LNK1181 error in Visual Studio when the .lib files that are specified during linking are not found in the current directory, any of the directories that are specified by the LIBPATH linker option, or any of the directories that are specified in the LIB environment variable.
I suggest you may add the directory that contains Psapi.lib library file to the LIBPATH to resolve the error:
1,In Solution Explorer, right-click the project, and then click Properties.
2,In the Property Pages dialog box, expand Linker, and then click General.
3,In the Additional Library Directories field, specify the path where Psapi.lib resides.
The error can also happen when the LIBPATH contains spaces. If that's the case, move the library to a path without spaces or put quotation marks around the path.
For more details I suggest you could refer to the Doc: Linker Tools Error LNK1181.
Best Regards,
Jeanine Zhang
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.