Click here to Skip to main content
15,886,058 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
hi,im using windows 7 and visual c++2008
my problem is that every program i compile runs well in my computer but the compiled exe file is unable to run on differrent computers where visual c++ is not instolled..
can anyone solve my problem? pls post
Posted

You should run vc_redistx86.exe (http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=9b2da534-3e03-4391-8a4d-074b9f2bc1bf[^], or the x64 version) on the target machines.
:)
 
Share this answer
 
In addition to CPallini's answer, if you don't include standard C++ libraries, i.e. #include <cstdlib>, you will not need to distribute the C++ runtime. Visual C++ 2008 has access to the .Net framework, which in most cases provides equivalent functionality to cstdlib.
 
Share this answer
 
This is really an ancient posting, but if I add my $0.02 here..

Installing the redistribution package became very tricky now as there are so many different versions.

Instead of compiling the program in DLL, I suggest to use the Static Library Linking.
I don't know how big your program is. Static Library Linking will generate the executable file around 4~5MB which is not to bad.. Then you don't need to release the redistribution package.
 
Share this answer
 

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900