Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Auto build increment with C++?

Auto build increment with C++?

Scheduled Pinned Locked Moved C / C++ / MFC
csharpannouncementc++sharepointvisual-studio
7 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    jeffb42
    wrote on last edited by
    #1

    In the past I've worked on large teams and the build system we had in place would auto-increment the build number. At the moment I'm working on my own shareware project (written in C++, using VS2005) and I'd like to have Visual Studio auto-increment the build number for me (bonus points if it only increments the release version). I started to do some digging and I've read that Visual Studio has this feature with .NET projects, but I haven't read anywhere about this being available in C++ projects, so my questions are: * Does this exist for C++ project? * If so, what are the steps needed? * If not, are there any suggested tools or add-ins? What do some of the developers here use? Thanks, Jeff

    C L D 3 Replies Last reply
    0
    • J jeffb42

      In the past I've worked on large teams and the build system we had in place would auto-increment the build number. At the moment I'm working on my own shareware project (written in C++, using VS2005) and I'd like to have Visual Studio auto-increment the build number for me (bonus points if it only increments the release version). I started to do some digging and I've read that Visual Studio has this feature with .NET projects, but I haven't read anywhere about this being available in C++ projects, so my questions are: * Does this exist for C++ project? * If so, what are the steps needed? * If not, are there any suggested tools or add-ins? What do some of the developers here use? Thanks, Jeff

      C Offline
      C Offline
      Code o mat
      wrote on last edited by
      #2

      If you don't insist on an "index" of builds you could use the __DATE__ and __TIME__ macros which give you the build date-time combined with some pre or maybe post build step that deletes the OBJ file or maybe updates the file time to make sure the file you put the creation of a build number into will get built every time (you can make the post or pre build step only in your release target if that suits you).

      > The problem with computers is that they do what you tell them to do and not what you want them to do. < > Life: great graphics, but the gameplay sux. <

      J 1 Reply Last reply
      0
      • J jeffb42

        In the past I've worked on large teams and the build system we had in place would auto-increment the build number. At the moment I'm working on my own shareware project (written in C++, using VS2005) and I'd like to have Visual Studio auto-increment the build number for me (bonus points if it only increments the release version). I started to do some digging and I've read that Visual Studio has this feature with .NET projects, but I haven't read anywhere about this being available in C++ projects, so my questions are: * Does this exist for C++ project? * If so, what are the steps needed? * If not, are there any suggested tools or add-ins? What do some of the developers here use? Thanks, Jeff

        L Offline
        L Offline
        Lost User
        wrote on last edited by
        #3

        Codeproject has implemented a search feature which is useful in most situations. Have a look: http://www.codeproject.com/info/search.aspx?artkw=build+increment[^] Best Wishes, -David Delaune

        J 1 Reply Last reply
        0
        • L Lost User

          Codeproject has implemented a search feature which is useful in most situations. Have a look: http://www.codeproject.com/info/search.aspx?artkw=build+increment[^] Best Wishes, -David Delaune

          J Offline
          J Offline
          jeffb42
          wrote on last edited by
          #4

          Yes, I already had searched but when I found lots of articles where a macro was written, I noticed that each article had lots comments about bugs, and instead of weeding through the umpteen articles I decided to post my question here to this forum. So, back to original question, what do people here use? (if you use one of the macros from one of the articles then please recommend it) And does Visual Studio have an auto-increment feature available to C++ like managed projects do? Thanks, Jeff

          L 1 Reply Last reply
          0
          • C Code o mat

            If you don't insist on an "index" of builds you could use the __DATE__ and __TIME__ macros which give you the build date-time combined with some pre or maybe post build step that deletes the OBJ file or maybe updates the file time to make sure the file you put the creation of a build number into will get built every time (you can make the post or pre build step only in your release target if that suits you).

            > The problem with computers is that they do what you tell them to do and not what you want them to do. < > Life: great graphics, but the gameplay sux. <

            J Offline
            J Offline
            jeffb42
            wrote on last edited by
            #5

            Thanks, but I'm looking for an incremental increase in the build number. Jeff

            1 Reply Last reply
            0
            • J jeffb42

              Yes, I already had searched but when I found lots of articles where a macro was written, I noticed that each article had lots comments about bugs, and instead of weeding through the umpteen articles I decided to post my question here to this forum. So, back to original question, what do people here use? (if you use one of the macros from one of the articles then please recommend it) And does Visual Studio have an auto-increment feature available to C++ like managed projects do? Thanks, Jeff

              L Offline
              L Offline
              Lost User
              wrote on last edited by
              #6

              jeffb42 wrote:

              (if you use one of the macros from one of the articles then please recommend it)

              Nah, I am old fashion and I manually change my build numbers.

              jeffb42 wrote:

              And does Visual Studio have an auto-increment feature available to C++ like managed projects do?

              No, unfortunately Visual Studio C++ users do not get those überlegen modern features. This Microsoft Help and Support article has a sample build increment, I have never tried it. How to increment version information after each build in Visual C++[^] Good Luck, -David Delaune

              1 Reply Last reply
              0
              • J jeffb42

                In the past I've worked on large teams and the build system we had in place would auto-increment the build number. At the moment I'm working on my own shareware project (written in C++, using VS2005) and I'd like to have Visual Studio auto-increment the build number for me (bonus points if it only increments the release version). I started to do some digging and I've read that Visual Studio has this feature with .NET projects, but I haven't read anywhere about this being available in C++ projects, so my questions are: * Does this exist for C++ project? * If so, what are the steps needed? * If not, are there any suggested tools or add-ins? What do some of the developers here use? Thanks, Jeff

                D Offline
                D Offline
                David Crow
                wrote on last edited by
                #7

                jeffb42 wrote:

                * If not, are there any suggested tools or add-ins?

                See here.

                "Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown

                "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

                1 Reply Last reply
                0
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • World
                • Users
                • Groups