Author Topic: I don't change any source code, but click the build button will cause rebuild  (Read 6185 times)

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5913
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
I meet a strange problem.

I have a simple project(quexparser, http://code.google.com/p/quexparser).

Today, I have never change any source code, but everytime I click the build button, the while project will be rebuild. Is there something wrong?

thanks.

windows, latest debugger branch nightly.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Does this happen to all projects, or is it just this one ?
If it is the second, try to clean and/or manual remove the obj and other output-folders.

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5913
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
thanks jens.
I just tested other project.
 it seems the bug is only related to the quex library.( the project using quex library has this kind of problem, but others were not)

I have quex library 0.55.3 before. today, the new quex library 0.55.4 has released, so I just update to this version. So, the header files of quex library was updated.

Now, all the project using quex library meets this kind of problem. Even I totally delete the obj and bin folder, the problem still happens again and again.

Seems it is related to the new quex header files. but not sure how to solve this problem. :(
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Did you check the timestamps of the new quex-files ?

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5913
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Did you check the timestamps of the new quex-files ?
So, all the header files from quex-lib header should be older than my project??
I will check it, it seems one file (a python script) is 2010-11-24, and my windows system time is 2010-11-23 right now.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Did you check the timestamps of the new quex-files ?
So, all the header files from quex-lib header should be older than my project??
I will check it, it seems one file (a python script) is 2010-11-24, and my windows system time is 2010-11-23 right now.
Yes, at least after a build or rebuild.

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5913
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
I have solved my problem. :D

I just download a tool ( BatchTouch is a utility to batch-change the creation and or modification date of files and folders. it is a free ware. ) to change all the files' time-stamp under the quex foder and sub-folders. I change them to 2010-11-22 which is an older time stamp.

Now everything works very fine!!!

For those who meet the same problem, you can do like me.

thanks jens for the help!!!

BTW: not sure how to do it under plain windows batch script.

If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline reckless

  • Regular
  • ***
  • Posts: 338
can be done via batch file but you need touch.exe from either msys (needs the msys dll) or gnuwin coreutils (native windows)

some thing like this should do

@touch -t "%*"

where %* is the date time etc passed to the batch file.

so if your batch file is called touchthis.bat then call it like this touchthis.bat 2010-11-23



Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
To get the actual timestamp you can try
Code
copy *.*,,+
or put in a batch-file that scans all files in all subdirs and copies them.
Based on http://www.computing.net/answers/programming/batch-change-file-modified-date/17132.html .

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5913
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
thanks jens and reckless for your time and help!!!
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.