views:

106

answers:

3

Hi all,

When I try to open released .exe file (which I wrote in Visual Studio 2008) in VMWare Workstation 6.5 with Windows Server 2008 32bit OS, got "The application has failed to start because its side-by-side configuration is incorrect." error all time even if the code is;

#include <stdio.h>

int main ()
{

  printf ("HELLO\n");

  return 0;
}

Is anyone faced that king of problem or does know how to cope with it?

+1  A: 

You probably forgot to deploy the runtime support DLLs or copied the Debug build of your program. For a small program like this without DLLs that export C++ classes or pointers it is better to link the static version of the CRT. Project + Properties, C/C++, Code Generation, /MTd. Repeat for the Release configuration, now choose /MT.

Hans Passant
Thanks Hans it worked for that code but for my real project it gave same error. My real project includes inline-assembler. Do you have any idea if it requires further solution?
togikan
oopss its ok for now. thanks for you all..
togikan
A: 

It has nothing to do with VMWare -- it has to do with not having the correct side-by-side assemblies for the C runtime installed. You need to know which ones you require, and then install the runtime. You can also control it with a manifest.

There is some info here

http://en.wikipedia.org/wiki/Side-by-side_assembly

One easy way (for C/C++ programs) to get around this is to change to linking to the C-runtime statically. Go to your project properties, then Code Generation, and choose static linking for the C Runtime. Then you won't have a dependency on the runtime dlls. All libraries you might be using need to be linked this way for it to work.

Lou Franco
A: 

I generally get this error if the C/C++ runtime that the program was built with was not installed in the VM. You can download the CRT for Visual Studio 2008 SP1 at Microsoft's website. Make sure to download the correct version of the CRT based on the versions of Visual Studio used to build the app.

Andy
Is it for Visual Studio or Wİndows to be installed? If it is for windows, I need to install it to vm windows i guess.
togikan