1

Microsoft's MIDL compiler always adds a date/time information to generated *.h and *.c files:

/* File created by MIDL compiler version 8.00.0603 */
/* at Sun Nov 01 17:37:44 2015
*/

I want to keep these files in Version Control System, even though they are generated from IDL and do not change very often, because the header files are referenced from other projects. These files then always appear as modified to the VCS and I sometimes forget to manually exclude them from the current changeset, so they get committed needlessly.

Is there perhaps any MIDL switch that would disable this unnecessary date/time information?

  • Don't much about current midl, but if my memory doesn't betray me, that section is always at the very top of the file and always of the same format; thus you have a windows clone of [unix tail](https://en.wikipedia.org/wiki/Tail_%28Unix%29) on you box, you could, as a last resort, just cut it off (` tail -n +3 ` into a tmpfile; then maybe backup the original, then move tempfile to filename) in the makefile after the midl run. – decltype_auto Nov 08 '15 at 09:51
  • There are many trivial solutions to this problem. Demanding the one that cannot work is not a constructive way to get this problem solved. – Hans Passant Nov 08 '15 at 11:48
  • Run that compiler only if it's input changed?!? – Daniel Jour Nov 08 '15 at 14:32
  • Running the MIDL compiler only when the IDL file changes would be a solution, but I do not think MS Visual C++ projects have this option. – Michael Grafnetter Nov 08 '15 at 18:20

0 Answers0