Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: VC8.0
i am building a simple mfc dialog based project with visual studio 2005/2008
that program works on some machines and on some others it gives side by side error.
 
if i build the same project in some other computer that program works on all the
machines ..including the machines which it was not working ..
Posted 22-Jan-11 22:18pm
Comments
Estys at 23-Jan-11 5:20am
   
Removed your "Answer" and added it as comment to the answerer.
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

This is a very un-informative error which means the required CRT or MFC run-times aren't installed on the computer.
 
Either change the project to:
If you are using MFC, change Project>Properties>General>Use of MFC to Use MFC in a Static Library, otherwise leave it as Use Standard Windows Liraries
AND
Set the Project>Properties>C/C++>Code Generation>Runtime Library to not have DLL in the name so it uses static linking
 
or, get the run-times for your version of MFC and visual studio from MSDN.
Visual Studio 2008 x86[^]
Visual Studio 2005 SP1 x86[^]
To find the others (including x64) just google "Visual Studio redist"
 
EDIT:
Just to clarify, the runtimes are to be installed on the computer you are running it on, with the same platform that the .exe you are trying to run (i.e. a Win32 .exe will need the x86 redist, even if it is running on a x64 computer).
  Permalink  
v2
Comments
Estys at 23-Jan-11 5:19am
   
@Andrew Brock : Added comment from OP given as an answer.
 
From Rajesh Katalkar :
 
but the program works on the computer where it was not working
without any modification if built on some other machine
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

Rajesh Katalkar :
but the program works on the computer where it was not working
without any modification if built on some other machine
 

This still supports my answer. The following will be happening in a situation like this:
Build computer A compiled the project with Visual Studio W, which has MFC X
Build computer B compiled the project with Visual Studio Y, which has MFC Z
 
This means that the project requires different versions of the Visual Studio Redistributable files.
So, the computer you were testing the project on may only have the redistributable files required by Build computer B, meaning the project will only work if it was compiled from that computer.
 
You can verify by what I am saying by grabbing a copy of Dependancy Walker[^] and opening the executable file. This will show the DLL files required for the program to run. There will be files named something like MSVCRT, MSVCR, MSVCM, ATL, MFC, ...
All these files will have a version number in the name, and can be found in the Side-by-Side directory C:\Windows\WinSxS (SxS = Side-by-Side)
 
If you run Dependancy Walker on the build computer it will find all the required DLLs, if you run it on a computer that shows the error message, it will show an error message saying that it couldn't find all the dependencies.
 
Both solutions from my previous answer will correct this problem will correct it.
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 7,903
1 Sergey Alexandrovich Kryukov 7,192
2 DamithSL 5,604
3 Manas Bhardwaj 4,986
4 Maciej Los 4,820


Advertise | Privacy | Mobile
Web04 | 2.8.1411023.1 | Last Updated 23 Jan 2011
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100