且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

链接:致命错误LNK1181:无法打开输入文件'libclamav.lib'

更新时间:2021-12-07 23:21:29

当在当前目录(由 LIBPATH $ c指定的任何目录)中找不到链接期间指定的.lib或.obj文件时,在Visual Studio中会收到LNK1181错误。 $ c>链接器选项,或 LIB 环境变量中指定的任何目录。

You get an LNK1181 error in Visual Studio when the .lib or .obj 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.

您可以将包含 libclamav.lib 库文件的目录添加到 LIBPATH 即可解决此问题(此说明可能会有所不同取决于您的Visual Studio版本):

You may add the directory that contains libclamav.lib library file to the LIBPATH to resolve the problem (this instructions may vary a bit depending on your Visual Studio version):


  1. 在解决方案资源管理器中,右键单击该项目,然后单击属性 >。

  2. 属性页对话框中,展开链接器,然后单击clic k 常规

  3. 其他库目录字段中,指定 libclamav.lib 驻留。

  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 libclamav.lib resides.

LIBPATH 时也会发生错误>包含空格。如果是这种情况,请将库移到没有空格的路径或在路径周围加上引号。

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.