We help IT Professionals succeed at work.

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

iyanovsk
iyanovsk asked
on
Medium Priority
292 Views
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
Comment
Watch Question

Commented:
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

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts
Architect - Coder - Mentor
CERTIFIED EXPERT
Commented:
Hello!

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

Commented:
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!
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.