Archived

This topic is now archived and is closed to further replies.

Build numbers

This topic is 5309 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

How would I go about implementing a system that would automatically update a build number for my projects when I compile them? Specifically I want to be able to check that my executable is using the latest version of my library, so that if I forget to recompile it after making a change to my library I don't waste time wondering why things aren't working properly. [edited by - SpaceRogue on June 4, 2003 9:04:49 PM]

Share this post


Link to post
Share on other sites
Rather than creating build numbers that you have to manage, why not just set up your build environment so that you have an automatic dependency structure. In most IDEs, you can do that quite easily by clicking a few checkboxes and in Makefiles, you setup your targets to be dependent on certain other targets (such as libs) and source files, so that when you make a change to one file, you will automatically build everything that is affected by that one change.

Much better, I think, then trying to keep track of which build number of some library belongs to which build number of some executable which belongs to which build number of some dll, etc., etc., etc...

Share this post


Link to post
Share on other sites
Personally, I would just set the dependency of the projects. But I can also see how adding a build number that increased each time you compiled could be easily added via a VBScript in the MSVC IDE. Though really, using the __TIMESTAMP__ macro should be enough to keep track of builds.

Share this post


Link to post
Share on other sites