简体   繁体   English

VS 2017项目中不断出现LNK1104错误

[英]Constant LNK1104 errors in VS 2017 project

I have this huge ond very old C++ project I am building with Visual Studio 2017 using the VS 2013 compiler and Incredibuild. 我有一个巨大的ond非常老的C ++项目,我正在使用VS 2013编译器和Incredibuild与Visual Studio 2017一起构建。

When I am building the project I very often get LNK1104 linker errors, that the output file can't be opened. 在构建项目时,我经常会收到LNK1104链接器错误,提示无法打开输出文件。 If I build again after getting the error, linking this project works fine but I get the same error with one of the next projects in the solution. 如果在收到错误后再次构建,则链接此项目可以正常进行,但与解决方案中的下一个项目发生相同的错误。

Sometimes this error doesn't occur and the whole solutions builds fine and other times I get this error a dozen times until I have all the projects build. 有时不会发生此错误,并且整个解决方案都可以正常构建,而有时我会多次出现此错误,直到我构建了所有项目。

It looks like VS is blocking itself but I have no clue where to look at and didn't find many helpful clues so far. 看起来VS本身在阻止自己,但我不知道在哪里看,也到目前为止找不到很多有用的线索。 But this is driving me crazy. 但是,这让我发疯。

I've had similar issues with Incredibuild and it was always one of two reasons: 我在Incredibuild中遇到过类似的问题,这始终是两个原因之一:

  • My project build order was wrong, so I was ending up trying to link to a lib/dll that was not builded yet 我的项目构建顺序错误,因此我最终尝试链接到尚未构建的lib / dll
  • A running program somewhere else on my computer was already using one of the dll/exe I was trying to build 我计算机上其他地方正在运行的程序已经在使用我尝试构建的dll / exe之一

Try to review your build order by setting up each project's dependencies in Solution >> Project Dependencies >> Dependencies 尝试通过在解决方案>>项目依赖项>>依赖项中设置每个项目的依赖项来查看构建顺序

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM