Visual Studio:链接:致命错误 LNK1181:无法打开输入文件 [英] Visual Studio: LINK : fatal error LNK1181: cannot open input file

查看:113
本文介绍了Visual Studio:链接:致命错误 LNK1181:无法打开输入文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

一段时间以来,我一直在 Visual Studio 2010 中遇到一个奇怪的错误.

I've been encountering a strange bug in Visual Studio 2010 for some time now.

我有一个解决方案,其中包含一个编译为静态库的项目,以及另一个非常简单但依赖于该库的项目.

I have a solution consisting of a project which compiles to a static library, and another project which is really simple but depends on this library.

有时,最近几天非常频繁,在重建解决方案或仅使用 1-3 个更改的源文件编译后,我收到以下错误:

Sometimes, in the last days extremely frequent, after Rebuilding the Solution or just compiling it with 1-3 changed source files, I get the following error:

2>LINK : fatal error LNK1181: cannot open input file 'thelibrary.lib'
========== Rebuild All: 1 succeeded, 1 failed, 0 skipped ==========

编译 thelibrary.lib 是成功的,没有任何错误或警告.

Where compiling thelibrary.lib was a success without any errors or warnings.

我已尝试清洁解决方案,但这并不总是有效.

I have tried cleaning the solution, but that doesn't always work.

  • 这里有什么问题?

推荐答案

在 Linker, general, Additional library 目录中,将目录添加到您已包含在 Linker, Input 中的 .dll 或 .libs 中.如果你把它放在 VC++ 目录、库目录中,它就不起作用了.

In Linker, general, additional library directories, add the directory to the .dll or .libs you have included in Linker, Input. It does not work if you put this in VC++ Directories, Library Directories.

这篇关于Visual Studio:链接:致命错误 LNK1181:无法打开输入文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆