0

I have problem with the windows time and date of my computer, which randomly go backward to when the machine turned on. When this happens, anything I changed in the source files will not be compiled and vs just says "xxx.exe - 0 errors,0 warning" or "0 succeed 0 failed 1 up-to-date, 0 skipped". Rebuild solution will result in loss of precompiled header then a full rebuild. And it is difficult to keep the time running forward. Is there any other suggestions on a fast build when the time goes wrong? Sorry for my poor English

Exbo
  • 21
  • 2

1 Answers1

0

VS2010 is doing what it's designed to do. A correctly functioning clock is a prerequisite for every build system.

So move the clock forward before you save any cpp files. Create an icon for visual studio corresponding to a batch file which syncs the system clock and then launches devenv if you must (see more here: https://superuser.com/questions/323581/synchronize-internet-time-in-a-windows-script ; or https://superuser.com/questions/15596/automatically-run-a-script-when-i-log-on-to-windows )

If you refuse to fix this right, then you will experience nonstop pain and build confusion. So I suggest you fix it right. If you don't want to fix it:

  • In solution explorer, right-click the c++ file you just saved and pick 'compile'. It will build again without respect to the timestamps

  • Or, you can manually delete the .obj files you want to rebuild. "del Debug*.obj" for instance would delete all of them without affecting the PCH.

Community
  • 1
  • 1
zeromus
  • 1,648
  • 13
  • 14