Is it possible to create some kind of listing, in the compile/linking time, with file version information,taken from source control program (ClearCase in our case)? I mean that I want to have detailed information, of what version of which file was used in current compilation. Thank you in advance :)
Most source control systems have some way to insert version information into the text of the controlled files - usually by some sort of keyword expansion. You just need to use this to initialise some strings in code space; eg,
code char version[] ="$_version_$";
code char build_timestamp[] = "__DATE__" "__TIME__";
Did I get the wrong end of the stick there? You just want a listing, rather than to embed the information in the generated object file(s)? If that's the case, the solution is similar - but you just get the source control system to put the information into a comment somewhere in each file. The header comment for each file would seem the obvious place... eg,
/* File: blah.c * Version: $_version_$ * etc... : : */