VS2010 总是重新链接项目 [英] VS2010 always relinks the project

查看:35
本文介绍了VS2010 总是重新链接项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在将复杂的混合 C++/.NET 解决方案从 VS2008 迁移到 VS2010.

I am migrating a complex mixed C++/.NET solution from VS2008 to VS2010.

升级后的解决方案适用于 VS2010,但构建系统总是引用一个 C++/CLI 程序集.它不会重新编译任何东西,但链接器会接触到文件.这会导致构建中下游的连锁反应作为一大堆依赖然后重新构建.

The upgraded solution works in VS2010, but the build system is always refereshing one C++/CLI assembly. It doesn't recompile anything, but the linker touches the file. The causes a ripple effect downstream in the build as a whole bunch of dependent then get rebuilt.

关于如何找出为什么它认为需要重新链接文件的任何想法?我打开了详细构建日志记录,但没有什么特别之处.

Any ideas on how to find out why it thinks it needs to relink the file? I've turned on verbose build logging, but nothing stands out.

推荐答案

原来的问题是 PDB 文件名是在both 编译器设置和链接器设置(同名)下定义的.

Turns out the problem was that the PDB filename was defined under both the compiler settings and the linker settings (with the same name).

这似乎在 VS2010 中引起了一个问题,因为中间目录(编译器输出?)中的旧"pdb 被复制到输出目录(链接器输出?)中的那个.这导致输出目录中的 pdb 比某些 obj 文件旧,并强制下次重新链接(冲洗并重复).

This seemed to cause a problem in VS2010 as somehow an 'old' pdb from the intermediate directory (compiler output?) was being copied over the one in the output directory (linker output?). This resulted in the pdb in the output directory being older than some of the obj files and forcing the relink next time around (rinse and repeat).

清除 pdb 名称设置似乎可以解决问题,默认设置也很好.

Clearing the pdb name settings seemed to fix the problem, and the defaults were fine.

这篇关于VS2010 总是重新链接项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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