MS Visual Studio 2005, Visual C++:   Executables do not run on other computers.

Posted on 2006-04-04
Last Modified: 2010-04-24
I'm using Visual Studio 2005 environment to compile my C++ programs on Windows XP.  I noticed that the executables do not run on other Windows XP based computers (i.e. I get an error that the application can not run).  I also noticed that Visual C++ 2005 generates much smaller executables (about 5 to 8 times smaller) than Visual C++ 2003.  I believe that Visual Studio 2005 uses some libraries that are not linked during compilation.  I tried to change a couple of settings in Visual Studio 2005, but did not succeed.  Do you know what I can change so that the executables run on other Windows machines?

Thank You
Question by:iyanovsk
    LVL 48

    Assisted Solution

    The following file contains VC++ 8.0 runtime and must be installed on client computer:

    Program Files\Microsoft Visual Studio 8\SDK\v2.0\BootStrapper\Packages\vcredist_x86\vcredist_x86.exe
    LVL 10

    Accepted Solution


    If you have developed the applications using managed code, you have to deploy also the .NET Framework 2.0 because VS 2005 need it.
    For Win32 target applications, you have to deploy the redistributable runtime files as AlexFM already mentioned.

    Anyway, from your description I'm almost conviced that your executable is compiled as managed code (/clr option in Project Settings), so the first case is more appropriate for you.

    Author Comment

    Thank You,

       I tried both proposed solutions, and both worked.  However, the patch  vcredist_x86.exe  works in most cases.  For some cases, when /clr options are changed, this does not work.  Installing the MS .NET Framework 2.0 always fixes the problem.

    Thank You for your help!

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Enabling OSINT in Activity Based Intelligence

    Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

    The following diagram presents a diamond class hierarchy: As depicted, diamond inheritance denotes when two classes (e.g., CDerived1 and CDerived2), separately extending a common base class (e.g., CBase), are sub classed simultaneously by a fourt…
    In Easy String Encryption Using CryptoAPI in C++ ( I described how to encrypt text and recommended that the encrypted text be stored as a series of hexadecimal digits -- because cyphertext may…
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    779 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