Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8914467
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T04:43:31+00:00 2026-06-15T04:43:31+00:00

I have 2 Visual C++ projects which both have an RC file where the

  • 0

I have 2 Visual C++ projects which both have an RC file where the Field Product Version is defined. How can I make both projects to get this version from a global place? Global RC file or what solutions are there?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T04:43:33+00:00Added an answer on June 15, 2026 at 4:43 am

    What works well for me is adding two “Solution Items”. One is a .h file that #defines some version strings, and another is the .rc file that has an include to the .h and BLOCK "StringFileInfo" that uses the defines.

    Individual resource files for each project use a TEXTINCLUDE to bring in the contents of the solution’s .rc.

    That is a lot to take in. Let me show you what I mean…

    1) The two solution items are added as so:

    Solution Items

    2) version.h has some #defines that will be used in VersionInfo.rc2

    #define SOLUTIONFILEVERSION 1,00,0000,00000
    #define SOLUTIONFILEVERSIONSTRING "1,00,0000,00000"
    #define COPYRIGHT "Copyright 2012"
    #define PRODUCTNAME "Your product name"
    #define COMPANYNAME "Your company name"
    

    3) VersionInfo.rc2 uses the defines

    #include "version.h"
    VS_VERSION_INFO VERSIONINFO
     FILEVERSION SOLUTIONFILEVERSION
     PRODUCTVERSION SOLUTIONFILEVERSION
     FILEFLAGSMASK 0x3fL
    #ifdef _DEBUG
     FILEFLAGS 0x1L
    #else
     FILEFLAGS 0x0L
    #endif
     FILEOS 0x4L
     FILETYPE 0x2L
     FILESUBTYPE 0x0L
    BEGIN
        BLOCK "StringFileInfo"
        BEGIN
            BLOCK "040904b0"
            BEGIN
                VALUE "CompanyName", COMPANYNAME
                VALUE "FileVersion", SOLUTIONFILEVERSIONSTRING
                VALUE "LegalCopyright", COPYRIGHT
                VALUE "ProductName", PRODUCTNAME
                VALUE "ProductVersion", SOLUTIONFILEVERSIONSTRING
            END
        END
        BLOCK "VarFileInfo"
        BEGIN
            VALUE "Translation", 0x409, 1200
        END
    END
    

    You will want a new line at the end of this file to make the resource compiler happy when it is included in the next step.

    Another field you might like to set is “FileDescription” but that is typically on a per-project basis. Remember, this can contain anything you would like to be shared between your projects.

    4) Include the VersionInfo.rc2 in each process. This is done by right clicking on the each project’s .rc in the Resource View and selecting Resource Includes.

    Add to the Compile-time directives: #include "../VersionInfo.rc2"

    Compile-time directives

    This could be done manually by adding the following to the project’s .rc file but it is probably better to let Visual Studio manage everything it can for you.

    3 TEXTINCLUDE 
    BEGIN
        "#include ""../VersionInfo.rc2""\r\n"
        "\0"
    END
    
    /////////////////////////////////////////////////////////////////////////////
    //
    // Generated from the TEXTINCLUDE 3 resource.
    //
    #include "../VersionInfo.rc2"
    /////////////////////////////////////////////////////////////////////////////
    

    Phew….that was a mouthful. But now you should be able to change your product versions from one spot.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have some visual studio projects which depend on other projects, which have different
I have a Visual Studio project which uses nmake to call a Python file
I have a Visual Studio 2010 C# project which creates an .exe and this
Hi I have a Wix (Votive) Visual Studio project which creates an MSI from
I have a WCF visual studio project, which contains many SVC files. Can I
I have a Visual C++ solution with 2 projects AlgorithmA & AlgorithmB and both
I have a Visual Studio solution which is open in both blend 2 SP1
Hi I have a visual studio project which includes postbuildevents in the following form:
I have a Visual Studio Setup project which has a Application Folder DefaultLocation set
I have created a dataset in my visual studio project which is connected to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.