Automatically adding version number to the code

Is there any method/technique/feature to add automatically incremented build number to the code (managed by software or tool)?
the build number can be used for viewing (hence traceability of the code).

Parents
  • Do i have to pass the values using 'argv & argc'?

    I was also studying the tortoise svn help file (chap 5) where i came across the following example:

    // Test file for SubWCRev: testfile.tmpl
    
    char *Revision = "$WCREV$"; //Revision is a pointer and doesnot point any memory location _array_.
    char *Modified = "$WCMODS?Modified:Not modified$";
    char *Date     = "$WCDATE$";
    char *Range    = "$WCRANGE$";
    char *Mixed    = "$WCMIXED?Mixed revision WC:Not mixed$";
    char *URL      = "$WCURL$";
    // End of file
    

    I copied it in a version.h file, as it is but did not work. When i displayed the string on the uart i could only see '$' and the characters of the file printed previously. i guess it is because of pointer not pointing any memory location (the string is also not in the code memory as 'code' keyword is not used).

    Comment

Reply
  • Do i have to pass the values using 'argv & argc'?

    I was also studying the tortoise svn help file (chap 5) where i came across the following example:

    // Test file for SubWCRev: testfile.tmpl
    
    char *Revision = "$WCREV$"; //Revision is a pointer and doesnot point any memory location _array_.
    char *Modified = "$WCMODS?Modified:Not modified$";
    char *Date     = "$WCDATE$";
    char *Range    = "$WCRANGE$";
    char *Mixed    = "$WCMIXED?Mixed revision WC:Not mixed$";
    char *URL      = "$WCURL$";
    // End of file
    

    I copied it in a version.h file, as it is but did not work. When i displayed the string on the uart i could only see '$' and the characters of the file printed previously. i guess it is because of pointer not pointing any memory location (the string is also not in the code memory as 'code' keyword is not used).

    Comment

Children
More questions in this forum