what is required to open a MSVC++ compiled program?

This is a discussion on what is required to open a MSVC++ compiled program? within the Windows Programming forums, part of the Platform Specific Boards category; salutations, we are not sure if it is the right forum to make this question. when a basic C/C++ Win32 ...

  1. #1
    Registered User
    Join Date
    Apr 2008
    Posts
    49

    what is required to open a MSVC++ compiled program?

    salutations,

    we are not sure if it is the right forum to make this question.
    when a basic C/C++ Win32 program (non-MFC) is compiled to EXE in Visual C++ 6.0, does it need any additional files to run in a computer with no MSVC++ installed?
    what about Visual C++ 2008? we have read about a "redistributable package" for computers with no VC++ 2008 installed, but is it really necessary for compiling a basic Win32 program?

    thank you in advance.

  2. #2
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Posts
    22,998
    For 1) not true; however, with XP, the runtime files are already installed.
    For 2) you need to install the runtime. I believe you can find it here: http://www.mediafire.com/?zcsjzncbmm1
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  3. #3
    Registered User
    Join Date
    Apr 2008
    Posts
    49
    thank you for the answer. some further questions:
    what is there in this runtime? what more dependencies does the EXE program have besides the Windows DLL's? what makes it different from other C/C++ compilers for Windows (like Pelles C, Borland and MinGW)?
    Last edited by pc2-brazil; 08-03-2008 at 03:27 PM.

  4. #4
    and the hat of sweating
    Join Date
    Aug 2007
    Location
    Toronto, ON
    Posts
    3,545
    Open your .exe in Depends and it will tell you all the DLLs that your .exe will need in order to run.
    The ones with names like MSVCRT.DLL... are files that you will need to distribute along with your .exe.

  5. #5
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Posts
    22,998
    Visual Studio 2008 requires the runtime to be installed. Shipping the DLLs beside the app won't do, because they're side-by-side assemblies.
    Anyway, they contain the C/C++ libraries, as well as MFC.
    Some compilers embed this code directly in the EXE, making it swell in size. If they don't, you need to redistribute the runtime libraries.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  6. #6
    train spotter
    Join Date
    Aug 2001
    Location
    near a computer
    Posts
    3,859
    Quote Originally Posted by pc2-brazil View Post
    salutations,

    we are not sure if it is the right forum to make this question.
    when a basic C/C++ Win32 program (non-MFC) is compiled to EXE in Visual C++ 6.0, does it need any additional files to run in a computer with no MSVC++ installed?
    what about Visual C++ 2008? we have read about a "redistributable package" for computers with no VC++ 2008 installed, but is it really necessary for compiling a basic Win32 program?

    thank you in advance.
    I don't use MSVC 08 (just v6, 2003 and 2005)

    Most PCs should run a WIN32 app without additional dlls etc.
    .NET requires the right version of the framework.
    MFC requires the MFC dlls, unless you static link these libraries.

    A 'redistributable package' (installer) is a self extracting utility which installs your app, collecting settings (ie folder) from the user and adding registry settings etc. It is not required for simple apps unless the target machine has security restrictions.

    Most minor apps should just require the .exe to run.

    If in doubt, test on a machine which does not have MSVC installed.
    "Man alone suffers so excruciatingly in the world that he was compelled to invent laughter."
    Friedrich Nietzsche

    "I spent a lot of my money on booze, birds and fast cars......the rest I squandered."
    George Best

    "If you are going through hell....keep going."
    Winston Churchill

  7. #7
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Posts
    22,998
    Even the most basic Win32 app will likely use some C/C++ facilities, however, and thus require the runtime.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  8. #8
    train spotter
    Join Date
    Aug 2001
    Location
    near a computer
    Posts
    3,859
    Quote Originally Posted by Elysia View Post
    Even the most basic Win32 app will likely use some C/C++ facilities, however, and thus require the runtime.
    The OP's question was which components are not installed in a MS OS by default (ie which ones have to be added manually if you do not have MSVC installed) not which ones are used by the app.
    "Man alone suffers so excruciatingly in the world that he was compelled to invent laughter."
    Friedrich Nietzsche

    "I spent a lot of my money on booze, birds and fast cars......the rest I squandered."
    George Best

    "If you are going through hell....keep going."
    Winston Churchill

  9. #9
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Posts
    22,998
    Well the thing was that I reacted to your statement about:
    Most PCs should run a WIN32 app without additional dlls etc.
    While this is true, any use of a C/C++ facility inside the code will create a dependency on the C/C++ runtime, and therefore requiring those dlls to be installed on the target machine, which would mean installing the redistribute package.
    Unless the exe is compiled with static linking, of course.
    And 99% of all apps would at least use some basic C or C++ functions, not just pure 100% win32.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Program Plan
    By Programmer_P in forum C++ Programming
    Replies: 0
    Last Post: 05-11-2009, 02:42 AM
  2. Memory Representation of compiled C Program
    By gjagadish in forum C Programming
    Replies: 2
    Last Post: 04-03-2008, 04:02 AM
  3. Open with my program
    By elmutt in forum Windows Programming
    Replies: 12
    Last Post: 08-14-2007, 03:23 AM
  4. Open a new program from a C++ application
    By axr0284 in forum C++ Programming
    Replies: 9
    Last Post: 12-29-2004, 12:29 PM
  5. Ghost in the CD Drive
    By Natase in forum A Brief History of Cprogramming.com
    Replies: 17
    Last Post: 10-12-2001, 06:38 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21