CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2009
    Posts
    6

    Basic questions about VC runtimes and compatibility

    I have read now for a while about VC runtimes but did not found a satisfying answer for the following questions:

    1.) If I run a 32bit program (which needs a VC runtime) on a 64bit WinOS (Win7 or Win10): Do I need the 32bit VC runtime or the 64bit Runtime or both?

    2.) Are there (especially older) cumulative VC Runtimes which contain all the stuff from previous VC Runtimes?

    Assume I program requires the VC80.MFC Assembly win32 version 8.0.50727
    So that means from my point of view: At least an installed vcredist2008 is required. Or does vcredist2010 fit as well?

    3.) Assume I have a program EXE. How do I find out exactly which VC Runtime it requires? Is there in inspection tool which can peek into the (binary) code or header and find it out?

    4.) What is the difference between a "Redistributable" package and a a"Runtime"?

    Thank you
    Peter

  2. #2
    Join Date
    Nov 2018
    Posts
    120

    Re: Basic questions about VC runtimes and compatibility


  3. #3
    2kaud's Avatar
    2kaud is offline Super Moderator Power Poster
    Join Date
    Dec 2012
    Location
    England
    Posts
    7,822

    Re: Basic questions about VC runtimes and compatibility

    There is the c run time (CRT) and what is needed for MFC.

    For CRT, if this is statically linked, then the .exe includes the required CRT. For dynamically linked CRT, then the appropriate CRT version needs to present on the computer that runs the .exe. There are different CRT versions for 32 bit/64 bit and for different versions of the compiler. The current version is v142. If the program needs a particular version of a CRT to be present, then these CRT files can be redistributed.

    See
    https://docs.microsoft.com/en-us/cpp...?view=msvc-160
    https://docs.microsoft.com/en-us/cpp...?view=msvc-160

    You can have more than one CRT installed on the target computer - and also more than one CRT developer for the VS compiler. If you have more than one CRT installed under VS, then you can choose against which to compile. See Options/General/Platform Toolset
    All advice is offered in good faith only. All my code is tested (unless stated explicitly otherwise) with the latest version of Microsoft Visual Studio (using the supported features of the latest standard) and is offered as examples only - not as production quality. I cannot offer advice regarding any other c/c++ compiler/IDE or incompatibilities with VS. You are ultimately responsible for the effects of your programs and the integrity of the machines they run on. Anything I post, code snippets, advice, etc is licensed as Public Domain https://creativecommons.org/publicdomain/zero/1.0/ and can be used without reference or acknowledgement. Also note that I only provide advice and guidance via the forums - and not via private messages!

    C++23 Compiler: Microsoft VS2022 (17.6.5)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured