Solved

Increment file version in VC project.

Posted on 2001-08-28
7
261 Views
Last Modified: 2008-02-01
Delphi has this neat feature that let's you automatically increment the version resource with every build. It simply increments the right most digit...

Any ideas how to do the same in VC?
0
Comment
Question by:AssafLavie
7 Comments
 
LVL 1

Expert Comment

by:AlexReser
ID: 6431253
0
 
LVL 4

Author Comment

by:AssafLavie
ID: 6431316
Ah.. very close.
But it doesn't work for my project since the RC file is not in the project's main directory and it's not named after the project either...
it is:
include\script8.rc

0
 
LVL 4

Expert Comment

by:IainHere
ID: 6431319
Similar to above, but without some of the problems listed on that page:
http://support.microsoft.com/support/kb/articles/Q237/8/70.asp
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 4

Author Comment

by:AssafLavie
ID: 6431341
Thanks, but his second solution requires alot more work (for each project!). so I don't like it. The first one is almost ok, it's just not smart enough to find the right file...
0
 
LVL 86

Accepted Solution

by:
jkr earned 199 total points
ID: 6431699
I've seen several solutions, even though I have to add that I still got back to 'manually' doing this with shell scripts because of my 'bash'-centered build system:

http://www.codeproject.com/tools/autoincbuildnum.asp

http://www.pgh.net/~newcomer/incrementing_build_numbers.htm

http://www3.primushost.com/~ckollars/bldscrpt.html#increment

http://www.bearcanyon.com/tools/ (scroll down to 'BuildNum')
0
 
LVL 86

Expert Comment

by:jkr
ID: 6443225
Just out of curiosity, which one did you end up using?
0
 
LVL 4

Author Comment

by:AssafLavie
ID: 6443746
I havn't. None of them are as easy to use as Delphi. They all require some sort of messing around with res scripts, h files or MSDEV macros.
I'm also working in a team and the others don't find it acceptable.
But thanks.
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Unlike C#, C++ doesn't have native support for sealing classes (so they cannot be sub-classed). At the cost of a virtual base class pointer it is possible to implement a pseudo sealing mechanism The trick is to virtually inherit from a base class…
Written by John Humphreys C++ Threading and the POSIX Library This article will cover the basic information that you need to know in order to make use of the POSIX threading library available for C and C++ on UNIX and most Linux systems.   [s…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now