vs2008每次build都会重新编译链接 && 项目已经过期

转自:http://blog.youkuaiyun.com/movezzzz/article/details/6816605

无外乎两种情况:

1.时间问题,所创建的文件的时间比如是:2011-09-22 09:03:22,那么你的系统时间之前被你改动过当前时间是:2011-08-22 09:03:22。这下好了,vs每次编译的时候都会检查每个文件的最后修改日期,发现是上一个编译时间之后的,都会重新编译。所以在这一个月内,每次都会重新编译文件。

解决办法:

a.将文件稍作修改,加个注释之类的。然后重新保存,让其和系统时间一致。这样的话,可能有大量的文件,都需要这样做。

b.最好的方法,还是直接修改系统的时间。让其正常。就能解决。


2.如果,不是时间问题呢?那就是:没有启用/Gm编译选项。

解决办法:

设置工程属性,为以下选项:
C/C++ -> Code Generation -> Enable Minimal Rebuild: Yes(/Gm)
C/C++ -> Genera -> Debug Information Format: Program Database for Edit & Continue (/ZI), 或者 Program Database (/Zi)


得解,反正,我的是通过第二种方案解决的。


【项目已经过期解决方案】

To find the missing file(s), use info from the article Enable C++ project system logging to enable debug logging in Visual Studio and let it just tell you what's causing the rebuild:

Open the devenv.exe.config file (found in %PROGRAMFILES%\Microsoft Visual Studio 10.0(or others)\Common7\IDE\)
Add the following after the </configsections> line:

复制内容到剪贴板
代码:
<system.diagnostics>
  <switches>
    <add name="CPS" value="4" />
  </switches>
</system.diagnostics>
Res tar t Visual Studio
Open up  DbgView  and make sure it's capturing debug output
Try to debug (hit F5 in Visual Studio)
Search the debug log for any lines of the form:

devenv.exe Information: 0 : Project 'Bla\Bla\Dummy.vcxproj' not up to date because build input 'Bla\Bla\SomeFile.h' is missing.

(I just hit Ctrl+F and searched for not up to date) These will be the references causing the project to be perpetually "out of date".

To correct this, either remove any references to the missing files from your project, or update the references to indicate their actual locations.


http://stackoverflow.com/questio ... nothing-has-changed

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值