I know that in NetBeans and Visial you can somehow statically save the date and build time of your app. I’m building some software on a remote server with the g++ and I wonder if there is a way of creating for example something like this:
#define BUIL_DATE <here should be the compilation date>
That I could use later on in the app.
The
__TIME__and__DATE__(GCC-specific) macros are what you’re looking for. For example:See: http://gcc.gnu.org/onlinedocs/cpp/Standard-Predefined-Macros.html