Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

The system cannot execute the specified program. C++ VS2008 console.

Posted on 2009-04-08
3
Medium Priority
?
2,236 Views
Last Modified: 2013-12-14
Hi,

I'm having problems running a C++ console application that was compiled on another machine using Visual Studio 2008. It runs on the machine it was compiled on, but when I try to run it on my PC, I get the following message...

The system cannot execute the specified program.

I decided to see if I can isolate the problem by creating a simple "hello world" c++ console, but I still get the same message with the "hello world" program.

Leaving me to believe that their is something special about compiling c++ console apps on Visual Studio 2008 and then deploying them to other machines.

Has anyone seen this before or has got a workaround or fix?
#include <iostream>
#include <conio.h>
 
using namespace std;
 
int main()
{
 
	cout << "Hello world";
	getch();
 
}

Open in new window

0
Comment
Question by:silentthread2k
3 Comments
 
LVL 12

Expert Comment

by:Gideon7
ID: 24103805
The required C runtime DLLs are not installed on the computer.  Run vcredist_x86.exe to install the redistributable DLLs (MSVCR80.DLL, MSVCP80.DLL, etc)
The path will be something like "C:\Program Files\Microsoft SDKs\WIndows\V6.0A\Bootstrapper\Packages\vcredist_x86\vcredist_x86.exe".  To install the DLLs copy vcredist_x86.exe to the target computer and run it there.
0
 
LVL 19

Accepted Solution

by:
alb66 earned 2000 total points
ID: 24104887
You can download the "Microsoft Visual C++ 2008 Redistributable Package" from:
http://www.microsoft.com/downloads/details.aspx?FamilyID=9b2da534-3e03-4391-8a4d-074b9f2bc1bf&displaylang=en
0
 
LVL 39

Expert Comment

by:itsmeandnobodyelse
ID: 24105369
>>>> Run vcredist_x86.exe to install the redistributable DLLs (MSVCR80.DLL, MSVCP80.DLL, etc)

VS2008 has MSVCR90.DLL and MSVCP90.DL.

VC80  is VS2005.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
Examines three attack vectors, specifically, the different types of malware used in malicious attacks, web application attacks, and finally, network based attacks.  Concludes by examining the means of securing and protecting critical systems and inf…
THe viewer will learn how to use NetBeans IDE 8.0 for Windows to perform CRUD operations on a MySql database.
The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.
Suggested Courses

916 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question