views:

181

answers:

4

I have a debug .exe file that i want to run on other machines that don't have MS Visual Studio 2008 installed on them. How can this be done? The release option doesn't work as the application does not function correctly when build in release (not sure why).

At the moment I'm getting a message saying "This application has failed to start because the application configuration is incorrect".

A: 

You need to install the VC++ runtime on the other machine choose one (or both) of the following (depending on the version of visual studio you are using)...

  1. VS2008

  2. VS2005

SDX2000
I have installed the VS2008 distribuation pack but still getting the same error.
Pazzy
A: 

Remote debugging is available. You can do that from the Visual Studio from the developer PC to the system in which the program is running. Refer the links below

http://msdn.microsoft.com/en-us/library/bt727f1t(VS.71).aspx

http://msdn.microsoft.com/en-us/library/bt727f1t.aspx

bdhar
A: 

You have two options:

  1. Install the debug version of VC redist
  2. Copy the debug runtime (C and or MFC) into your application directory. You'll find the debug runtime in your Visual Studio directory, e.g. C:\Program Files (x86)\Microsoft Visual Studio 8\VC\redist\Debug_NonRedist\x86\Microsoft.VC80.DebugCRT. You'll have to copy this directory into your application directory, and make sure, that the application manifest references this version of the runtime.
humbagumba
should i copy the contents of this directory or the entire folder into the application directory? There are also DebugMFC and DebugOpenMP folders in here ... do these also need to be copied across?
Pazzy
Copy the entire folder into your application directory. You will only need to copy DebugMFC too if your application uses MFC.
humbagumba
A: 

In general in the most cases it is only the problem of the program dependencies like MSVCR90D.DLL. The problem is that debug version of C++ Runtime is not free redistributive.

If you cange "Code Generation" option from "Multi-threaded Debug DLL (/MDd)" to "Multi-threaded Debug (/MTd)". It can be that your program will run after this changes.

You can use profiling in "Dependency Walker" (see www.dependencywalker.com) to see all dependency of the application (inclusive all delay load DLLs).

Oleg
Well i got the release version to work correctly, but it still doesn't open when i have the redist pack installed on the target machine.
Pazzy
Sorry, I don't understand your comment. You asked about starting DEBUG version of your exe on the another computer. Now you say about RELEASE version. Want do you want to do? Redistribution pack you need if you compile your C/C++ application with "Multi-threaded Debug DLL (/MDd)" or "Multi-threaded DLL (/MD)" code genecation setting. If you use "Multi-threaded Debug (/MTd)" or "Multi-threaded (/MT)" your EXE will larger, butt all C/C++ runtime functions will be INSIDE of your EXE, so you don't need in the most cases to inslall any redist pack for C/C++ runtime
Oleg
Sorry for not making any sense earlier, your right I was asking about the debug exe. Nevermind, all sorted now. Thanks again for your input. It helped a great deal :)
Pazzy