Re: Versioning on Build



Would something like this work for you:

http://www.codeproject.com/cpp/makeversion.asp

Tom


"Stick" <Stick@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message news:0E22A0FF-25F6-46EE-9BA6-E9ACD61E9ACB@xxxxxxxxxxxxxxxx
Hi,

I would love to be able to have the build number increment each time I
compile, but I am not familiar with the correct way to do versioning in C++.

I have VS 2005 Pro, and in a header, I have this:

#define VERSION_MAJOR 1
#define VERSION_MINOR 0
#define VERSION_BUILD 200

// Magic to get the preprocessor to do what we want
#define lita(arg) #arg
#define xlita(arg) lita(arg)
#define cat3(w,x,z) w##.##x##.##z##\000
#define xcat3(w,x,z) cat3(w,x,z)
#define VERSION_STRING
xlita(xcat3(VERSION_MAJOR,VERSION_MINOR,VERSION_BUILD))

#ifndef VS_VERSION_INFO
#define VS_VERSION_INFO 0x0001
#endif


but, while that info shows up if I look at the file properties, it still
shows 1.0.0.0 if I hover over the file.

Also, this is not automatic.

How can I change that version tha shows on hover? How does one setup
properly to have builds increment with each compile automatically?

Thanks,

Patrick


.