简体   繁体   English

为什么会出现间歇性的msvc ++链接错误?

[英]Why do I get an intermittent msvc++ link error?

Maybe 1 times out of 5, I get this error on a specific machine (incidentally, our buildbot) but it never occurs on my dev machine. 也许五分之一,我在特定机器上(偶然地,是我们的buildbot)得到这个错误,但是在我的开发机器上却从未发生过。 I'm hoping that there's a hotfix for this from Microsoft, but I can't find one. 我希望可以从Microsoft获得此修补程序,但找不到。

LINK : fatal error LNK1104: cannot open file 'Debug\synergy.lib'

It might be worth noting that this is using the 64-bit build tool, so I suppose that could be relevant. 可能值得注意的是,这正在使用64位构建工具,因此我认为这可能是有意义的。 The machine is 32-bit, but I'm not sure if that's important. 机器是32位的,但是我不确定这是否重要。 Please review the full compile log for details. 请查看完整的编译日志以获取详细信息。

That's because you had a compile error in synergy project: 那是因为您在synergy项目中有一个编译错误:

c:\\Program Files\\Microsoft Visual Studio 9.0\\VC\\include\\xlocale(265) : error C2039: '_DebugHeapTag_func' : is not a member of 'std' c:\\ Program Files \\ Microsoft Visual Studio 9.0 \\ VC \\ include \\ xlocale(265):错误C2039:'_DebugHeapTag_func':不是'std'的成员

So synergy.lib was not built and hence the dependent projects could not find it. 因此并未构建synergy.lib ,因此相关项目无法找到它。 The reason why it happens on the build machine is that most likely it gets cleaned before a build, the lib file is never there unless it's built. 它在构建机器上发生的原因是最有可能在构建之前将其清除,除非构建它,否则lib文件永远不会存在。 On your dev machine even if there is an error, the output file is still there and the dependent project compiles. 在您的开发机器上,即使出现错误,输出文件仍然存在,并且相关项目会进行编译。

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

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