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


.



Relevant Pages

  • Re: [ANNOUNCE] VICE 1.18
    ... The file src/network.c won't compile with gcc 4.0.2 under SuSE Linux 10.0. ... network.c:235: error: invalid lvalue in increment ...
    (comp.emulators.cbm)
  • Re: Damn you, FEDEX! or Nikon D40 lost in Springfield, MO blackhole.
    ... the 2 mp Mavica he had been using with a Nikon D40. ... After shopping around, he got me to order one for him. ... The shipper had it insured, but from what I have read it could take weeks to sort this crap out. ... You may get your insurance from FedEx and a couple weeks later they find it and deliver it. ...
    (alt.photography)
  • Re: a[++j]=a[j]+a[j+1];
    ... its a kind of vague that assignment is happening before increment. ... This is called postfix increament which is perfectly right... ... google for postfix and prefix increament in C... ... While you can compile the OP code with any C compiler and get some ...
    (comp.lang.c)
  • Re: post increment not post
    ... It's not supposed to compile. ... I intended to define class a's post operator ++ to increment ... operator int&() { ...
    (comp.lang.cpp)
  • Re: XLint
    ... compile them I get a message saying that "Some input files use unchecked or ... file properties and no success. ... Expand the Build tree (if it isn't ...
    (comp.lang.java.programmer)