Windows Vista Beta | WinVistaBeta.com - Message | c++ exe refuses to execute

November 20, 2008  
Subject: c++ exe refuses to execute
Group: microsoft.public.vstudio.general
Date: 8/25/2008 4:51:18 AM
From: "Anonymous" [Email Address Protection]

I made a "hello world" win32 c++ console app in VS2008SP1, I get an error if
I try to run it on a other computers.
"This application has failed to start because the application configuration
is incorrect. Reinstalling the application may fix this problem."

1. Why?
2. How do I compile the same kind of exe as VS 6.0 did (which works fine
btw).

Source:
----------
#include <stdio.h>
int main(void)
{
printf("Hello!\n");
return 0;
}
----------



Back
Subject: Re: c++ exe refuses to execute
Group: microsoft.public.vstudio.general
Date: 8/25/2008 6:04:12 AM
From: David Lowndes [Email Address Protection]

>I made a "hello world" win32 c++ console app in VS2008SP1, I get an error if
>I try to run it on a other computers.
>"This application has failed to start because the application configuration
>is incorrect. Reinstalling the application may fix this problem."
>
>1. Why?

By default the application links to the DLL versions of the 'C'
run-time libraries, so you normally need to install those along with
your EXE.

>2. How do I compile the same kind of exe as VS 6.0 did (which works fine
>btw).

By far the simplest solution is to change your project build settings
to statically link to the 'C' runtime rather than the DLL versions.

Dave

Back