【发布时间】:2012-08-29 16:13:02
【问题描述】:
使用 Visual Studio 2012 构建一个基本的 C++ 项目。当我对源文件进行更改时:
- 编译对应的目标文件
- 编译器的 .tlog 文件已更新
- PDB 文件已更新
- 链接器的 .tlog 文件没有改变
- 链接器声明
All outputs are up-to-date.并且不构建新的可执行文件。
获取要构建的可执行文件的唯一方法是删除它。跟踪系统似乎有问题,我想知道是否有人可以对这个问题有所了解。
这是我更改两个文件后的 msbuild 输出,完整路径和一些其他内容被省略(此输出适用于 VS2010 工具集,但 2012 的行为相同):
1>Target "ClCompile" in file "C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Platforms\Win32\Microsoft.Cpp.Win32.targets"...
Using "CL" task from assembly "Microsoft.Build.CppTasks.Win32, Version=4.0.0.0...
Task "CL"
Read Tracking Logs:
cl.read.1.tlog
CL.2520.read.1.tlog
...
Outputs for ....
XXX.OBJ
YYY.OBJ
...
xxx.cpp will be compiled as xxx.cpp was modified...
yyy.cpp will be compiled as yyy.cpp was modified...
Write Tracking Logs:
cl.write.1.tlog
CL.2520.write.1.tlog
...
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\CL.exe ....
Tracking command:
C:\Program Files (x86)\Microsoft SDKs\Windows\v8.0A\bin\NETFX 4.0 Tools\Tracker.exe ....
xxx.cpp
yyy.cpp
Done executing task "CL".
1>Done building target "ClCompile" in project "xxx.vcxproj".
到目前为止,一切都很好。现在链接器开始了(好吧,它没有):
1>Target "Link" in file "C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Platforms\Win32\Microsoft.Cpp.Win32.targets"....
Using "Link" task from assembly "Microsoft.Build.CppTasks.Win32, Version=4.0.0.0...
Task "Link"
Using cached output dependency table built from:
link.write.1.tlog
Using cached input dependency table built from:
ink.read.1.tlog
Outputs for ....
MY.EXE
MY.PDB
All outputs are up-to-date.
Done executing task "Link".
Task "Message"
xxx.vcxproj -> my.exe
Done executing task "Message".
1>Done building target "Link" in project "xxx.vcxproj".
【问题讨论】:
-
有趣的是,我也有同样的问题,但解决方案对我不起作用。
-
您的中间/输出目录设置为什么?
-
$(IntDir) 是 $(VmRoot)Temp\$(ProjectName)\$(Platform)\$(Configuration)\,其中 $(VmRoot) 是开发环境的根,$ (VmRoot)Temp 不等于 %TMP% 或 %TEMP%。我目前正在测试该限制也适用于名为“Temp”的 all 目录的子目录的假设。
-
好点,也许它只是小写(“temp”)的字符串匹配。
标签: visual-studio-2010 visual-studio visual-studio-2012