CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Lindley is offline Elite Member Power Poster
    Join Date
    Oct 2007
    Seattle, WA

    Version string best practices

    I have a question that I know must have been solved a thousand times before, but I'd like to get the community's opinion on best practices.

    In short: how should I manage the version string of my targets? Each target (library or executable) will conceptually have a unique version number, and I'd like to be able to query the versions of all libraries in use by an executable (as well as its own version) at runtime. I also need to be able to update the version number(s) from a script, not by hand.

    I need a solution that works on linux, but I'd prefer for it to also work on Windows.

    One thing I've thought about is having a "version" file at the top level of each repo (one git repo per target) containing nothing more than the version number, and using the "xxd -i version version.h" command to generate a static array I can compile into my code. However, this fails the "works on Windows" test, among other things.

    Any suggestions?

  2. #2
    Join Date
    Jul 2013

    Re: Version string best practices

    Quote Originally Posted by Lindley View Post
    Any suggestions?
    Why not use a Version/Revision Control System.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Windows Mobile Development Center

Click Here to Expand Forum to Full Width

On-Demand Webinars (sponsored)

We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.